Versions in this module Expand all Collapse all v1 v1.1.0 Nov 15, 2018 v1.0.0 Nov 15, 2018 Changes in this version + type DPosVoteRing struct + DPosVoteS []*DPosVoteState + func NewDPosVoteRing(capacity int) *DPosVoteRing + type DPosVoteState struct + AffirmativeVotes []voteInfo + Hash common.Hash + Proposal interface{} + type MessageCenterInterface interface + PublishEvent func(aim mc.EventCode, data interface{}) error + SubscribeEvent func(aim mc.EventCode, ch interface{}) (event.Subscription, error) + type MessageSendInterface interface + SendNodeMsg func(subCode mc.EventCode, msg interface{}, Roles common.RoleType, ...) + type NodeOnLineInfo struct + Address common.Address + OnlineState [30]uint8 + type OnlineState uint8 + const Offline + const Online + func (o OnlineState) String() string + type TopNodeInstance struct + func NewTopNodeInstance(sh *signhelper.SignHelper, hd *hd.HD) *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 struct + func NewTopNodeService(cd consensus.DPOSEngine) *TopNodeService + 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 + func (serv *TopNodeService) GetConsensusOnlineState() (map[common.Address]OnlineState, map[common.Address]OnlineState) + type TopNodeStateInterface interface + GetTopNodeOnlineState func() []NodeOnLineInfo + type ValidatorAccountInterface interface + IsSelfAddress func(addr common.Address) bool + SignWithValidate func(hash []byte, validate bool) (sig common.Signature, err error)