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

Method is2ndProposer

consensus/vbft/node_utils.go:95–98  ·  view source on GitHub ↗
(blockNum uint32, peerIdx uint32)

Source from the content-addressed store, hash-verified

93}
94
95func (self *Server) is2ndProposer(blockNum uint32, peerIdx uint32) bool {
96 rank := self.getProposerRank(blockNum, peerIdx)
97 return rank > 0 && rank <= int(self.config.C)
98}
99
100func (self *Server) getProposerRank(blockNum uint32, peerIdx uint32) int {
101 self.metaLock.RLock()

Callers 4

startNewProposalMethod · 0.95
processTimerEventMethod · 0.95
handleProposalTimeoutMethod · 0.95
TestIs2ndProposerFunction · 0.80

Calls 1

getProposerRankMethod · 0.95

Tested by 1

TestIs2ndProposerFunction · 0.64