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

Method dropMsg

consensus/vbft/msg_pool.go:66–81  ·  view source on GitHub ↗
(msg ConsensusMsg)

Source from the content-addressed store, hash-verified

64}
65
66func (self *ConsensusRound) dropMsg(msg ConsensusMsg) {
67 msgs := self.msgs[msg.Type()]
68 for i, m := range msgs {
69 if m == msg {
70 // msg found, remove from msg-list
71 self.msgs[msg.Type()] = append(msgs[:i], msgs[i+1:]...)
72 // remove from msg-hash-list
73 for hash, m := range self.msgHashs {
74 if m == msg {
75 delete(self.msgHashs, hash)
76 return
77 }
78 }
79 }
80 }
81}
82
83func (self *ConsensusRound) hasMsg(msg ConsensusMsg, msgHash common.Uint256) bool {
84 if _, present := self.msgHashs[msgHash]; present {

Callers 1

DropMsgMethod · 0.80

Calls 1

TypeMethod · 0.65

Tested by

no test coverage detected