Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewThreadHeartBeatManager ¶
func NewThreadHeartBeatManager(pk, sk []byte, dPool idepositpool.DepositPool, metrics *metrics.Metrics) iheartbeat.HeartBeat
NewThreadHeartBeatManager returns the instance of ThreadHeartBeatManager. messageChan parameter is the channel for heartBeatManager to broadcast message.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is used to manage nodes to send and receive heartbeat messages.
type ThreadHeartBeatManager ¶
type ThreadHeartBeatManager struct {
// contains filtered or unexported fields
}
ThreadHeartBeatManager is the wrapper of HearBeatManager. This implements the Actor pattern, it is concurrency safe.
func (*ThreadHeartBeatManager) CheckConfirmation ¶
func (thbm *ThreadHeartBeatManager) CheckConfirmation(msg *wire.MsgBlockConfirmation) bool
CheckConfirmation is used to check whether the msg contains enough confirmations.
func (*ThreadHeartBeatManager) Has ¶
func (thbm *ThreadHeartBeatManager) Has(pk []byte) bool
Has is used to determine whether the heartbeat information of a given miner has been received.
func (*ThreadHeartBeatManager) PerceivedCount ¶
func (thbm *ThreadHeartBeatManager) PerceivedCount() int
PerceivedCount returns the counts of legal message of heartbeat.
func (*ThreadHeartBeatManager) Start ¶
func (thbm *ThreadHeartBeatManager) Start()
Start is used to make heartBeatManager work, it will start to send heartbeat message.
func (*ThreadHeartBeatManager) Stop ¶
func (thbm *ThreadHeartBeatManager) Stop()
Stop is used to stop sending heartbeat message.