(peerIdx uint32, msg *peerHeartbeatMsg)
| 1881 | } |
| 1882 | |
| 1883 | func (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 | |
| 1898 | func (self *Server) endorseBlock(proposal *blockProposalMsg, forEmpty bool) error { |
| 1899 | // for each round, one node can only endorse one block, or empty block |
no test coverage detected