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

Method onBlockSealed

consensus/vbft/msg_pool.go:215–231  ·  view source on GitHub ↗
(blockNum uint32)

Source from the content-addressed store, hash-verified

213}
214
215func (pool *MsgPool) onBlockSealed(blockNum uint32) {
216 if blockNum <= pool.historyLen {
217 return
218 }
219 pool.lock.Lock()
220 defer pool.lock.Unlock()
221
222 toFreeRound := make([]uint32, 0)
223 for n := range pool.rounds {
224 if n < blockNum-pool.historyLen {
225 toFreeRound = append(toFreeRound, n)
226 }
227 }
228 for _, n := range toFreeRound {
229 delete(pool.rounds, n)
230 }
231}

Callers 2

TestOnBlockSealedFunction · 0.45
sealBlockMethod · 0.45

Calls

no outgoing calls

Tested by 1

TestOnBlockSealedFunction · 0.36