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

Method HasMsg

consensus/vbft/msg_pool.go:142–153  ·  view source on GitHub ↗
(msg ConsensusMsg, msgHash common.Uint256)

Source from the content-addressed store, hash-verified

140}
141
142func (pool *MsgPool) HasMsg(msg ConsensusMsg, msgHash common.Uint256) bool {
143 pool.lock.RLock()
144 defer pool.lock.RUnlock()
145
146 if roundMsgs, present := pool.rounds[msg.GetBlockNum()]; !present {
147 return false
148 } else {
149 return roundMsgs.hasMsg(msg, msgHash)
150 }
151
152 return false
153}
154
155func (pool *MsgPool) GetProposalMsgs(blocknum uint32) []ConsensusMsg {
156 pool.lock.RLock()

Callers 3

TestHasMsgFunction · 0.80
TestOnBlockSealedFunction · 0.80
onConsensusMsgMethod · 0.80

Calls 2

hasMsgMethod · 0.80
GetBlockNumMethod · 0.65

Tested by 2

TestHasMsgFunction · 0.64
TestOnBlockSealedFunction · 0.64