MCPcopy Create free account
hub / github.com/DNAProject/DNA / processHeartbeatMsg

Method processHeartbeatMsg

consensus/vbft/service.go:1883–1896  ·  view source on GitHub ↗
(peerIdx uint32, msg *peerHeartbeatMsg)

Source from the content-addressed store, hash-verified

1881}
1882
1883func (self *Server) processHeartbeatMsg(peerIdx uint32, msg *peerHeartbeatMsg) {
1884 self.peerPool.peerHeartbeat(peerIdx, msg)
1885 log.Debugf("server %d received heartbeat from peer %d, chainview %d, blkNum %d",
1886 self.Index, peerIdx, msg.ChainConfigView, msg.CommittedBlockNumber)
1887 self.stateMgr.StateEventC <- &StateEvent{
1888 Type: UpdatePeerState,
1889 peerState: &PeerState{
1890 peerIdx: peerIdx,
1891 connected: true,
1892 chainConfigView: msg.ChainConfigView,
1893 committedBlockNum: msg.CommittedBlockNumber,
1894 },
1895 }
1896}
1897
1898func (self *Server) endorseBlock(proposal *blockProposalMsg, forEmpty bool) error {
1899 // for each round, one node can only endorse one block, or empty block

Callers 1

onConsensusMsgMethod · 0.95

Calls 2

DebugfFunction · 0.92
peerHeartbeatMethod · 0.80

Tested by

no test coverage detected