Documentation
¶
Overview ¶
Copyright 2018 The MATRIX Authors as well as Copyright 2014-2017 The go-ethereum Authors This file is consisted of the MATRIX library and part of the go-ethereum library.
The MATRIX-ethereum library is free software: you can redistribute it and/or modify it under the terms of the MIT License.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject tothe following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright 2018 The MATRIX Authors as well as Copyright 2014-2017 The go-ethereum Authors This file is consisted of the MATRIX library and part of the go-ethereum library.
The MATRIX-ethereum library is free software: you can redistribute it and/or modify it under the terms of the MIT License.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject tothe following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright 2018 The MATRIX Authors as well as Copyright 2014-2017 The go-ethereum Authors This file is consisted of the MATRIX library and part of the go-ethereum library.
The MATRIX-ethereum library is free software: you can redistribute it and/or modify it under the terms of the MIT License.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject tothe following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright 2018 The MATRIX Authors as well as Copyright 2014-2017 The go-ethereum Authors This file is consisted of the MATRIX library and part of the go-ethereum library.
The MATRIX-ethereum library is free software: you can redistribute it and/or modify it under the terms of the MIT License.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject tothe following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright 2018 The MATRIX Authors as well as Copyright 2014-2017 The go-ethereum Authors This file is consisted of the MATRIX library and part of the go-ethereum library.
The MATRIX-ethereum library is free software: you can redistribute it and/or modify it under the terms of the MIT License.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject tothe following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- type DPosVoteRing
- type DPosVoteState
- type MessageCenterInterface
- type MessageSendInterface
- type NodeOnLineInfo
- type OnlineState
- type TopNodeInstance
- func (self *TopNodeInstance) GetTopNodeOnlineState() []NodeOnLineInfo
- func (self *TopNodeInstance) IsSelfAddress(addr common.Address) bool
- func (self *TopNodeInstance) PublishEvent(aim mc.EventCode, data interface{}) error
- func (self *TopNodeInstance) SendNodeMsg(subCode mc.EventCode, msg interface{}, Roles common.RoleType, ...)
- func (self *TopNodeInstance) SignWithValidate(hash []byte, validate bool) (sig common.Signature, err error)
- func (self *TopNodeInstance) SubscribeEvent(aim mc.EventCode, ch interface{}) (event.Subscription, error)
- type TopNodeService
- func (serv *TopNodeService) GetConsensusOnlineState() (map[common.Address]OnlineState, map[common.Address]OnlineState)
- func (self *TopNodeService) LeaderChangeNotifyHandler(msg *mc.LeaderChangeNotify)
- func (self *TopNodeService) SetMessageCenterInterface(inter MessageCenterInterface)
- func (self *TopNodeService) SetMessageSendInterface(inter MessageSendInterface)
- func (self *TopNodeService) SetTopNodeStateInterface(inter TopNodeStateInterface)
- func (self *TopNodeService) SetValidatorAccountInterface(inter ValidatorAccountInterface)
- func (self *TopNodeService) SetValidatorReader(reader consensus.ValidatorReader)
- func (self *TopNodeService) Start() error
- type TopNodeStateInterface
- type ValidatorAccountInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DPosVoteRing ¶
type DPosVoteRing struct {
DPosVoteS []*DPosVoteState
// contains filtered or unexported fields
}
func NewDPosVoteRing ¶
func NewDPosVoteRing(capacity int) *DPosVoteRing
type DPosVoteState ¶
type MessageCenterInterface ¶
type MessageSendInterface ¶
type NodeOnLineInfo ¶
type OnlineState ¶
type OnlineState uint8
const ( Online OnlineState = iota + 1 Offline )
func (OnlineState) String ¶
func (o OnlineState) String() string
type TopNodeInstance ¶
type TopNodeInstance struct {
// contains filtered or unexported fields
}
//////////////////////////////////////////////////////////////////
func NewTopNodeInstance ¶
func NewTopNodeInstance(sh *signhelper.SignHelper, hd *hd.HD) *TopNodeInstance
func (*TopNodeInstance) GetTopNodeOnlineState ¶
func (self *TopNodeInstance) GetTopNodeOnlineState() []NodeOnLineInfo
func (*TopNodeInstance) IsSelfAddress ¶
func (self *TopNodeInstance) IsSelfAddress(addr common.Address) bool
func (*TopNodeInstance) PublishEvent ¶
func (self *TopNodeInstance) PublishEvent(aim mc.EventCode, data interface{}) error
func (*TopNodeInstance) SendNodeMsg ¶
func (*TopNodeInstance) SignWithValidate ¶
func (*TopNodeInstance) SubscribeEvent ¶
func (self *TopNodeInstance) SubscribeEvent(aim mc.EventCode, ch interface{}) (event.Subscription, error)
type TopNodeService ¶
type TopNodeService struct {
// contains filtered or unexported fields
}
func NewTopNodeService ¶
func NewTopNodeService(cd consensus.DPOSEngine) *TopNodeService
func (*TopNodeService) GetConsensusOnlineState ¶
func (serv *TopNodeService) GetConsensusOnlineState() (map[common.Address]OnlineState, map[common.Address]OnlineState)
提供换届服务获取当前经过共识的在线状态
func (*TopNodeService) LeaderChangeNotifyHandler ¶
func (self *TopNodeService) LeaderChangeNotifyHandler(msg *mc.LeaderChangeNotify)
func (*TopNodeService) SetMessageCenterInterface ¶
func (self *TopNodeService) SetMessageCenterInterface(inter MessageCenterInterface)
func (*TopNodeService) SetMessageSendInterface ¶
func (self *TopNodeService) SetMessageSendInterface(inter MessageSendInterface)
func (*TopNodeService) SetTopNodeStateInterface ¶
func (self *TopNodeService) SetTopNodeStateInterface(inter TopNodeStateInterface)
func (*TopNodeService) SetValidatorAccountInterface ¶
func (self *TopNodeService) SetValidatorAccountInterface(inter ValidatorAccountInterface)
func (*TopNodeService) SetValidatorReader ¶
func (self *TopNodeService) SetValidatorReader(reader consensus.ValidatorReader)
func (*TopNodeService) Start ¶
func (self *TopNodeService) Start() error
type TopNodeStateInterface ¶
type TopNodeStateInterface interface {
GetTopNodeOnlineState() []NodeOnLineInfo
}