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

Method compareTxHeight

txnpool/common/transaction_pool.go:115–123  ·  view source on GitHub ↗

compareTxHeight compares a verifed transaction's height with the next block height from consensus. If the height is less than the next block height, re-verify it.

(txEntry *TXEntry, height uint32)

Source from the content-addressed store, hash-verified

113// block height from consensus. If the height is less than the next block
114// height, re-verify it.
115func (tp *TXPool) compareTxHeight(txEntry *TXEntry, height uint32) bool {
116 for _, v := range txEntry.Attrs {
117 if v.Type == vt.Stateful &&
118 v.Height < height {
119 return false
120 }
121 }
122 return true
123}
124
125// GetTxPool gets the transaction lists from the pool for the consensus,
126// if the byCount is marked, return the configured number at most; if the

Callers 2

GetTxPoolMethod · 0.95
GetUnverifiedTxsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected