forked from TrueCloudLab/neoneo-go
core: drop stale transactions from the mempool
They're no longer valid if `ValidUntilBlock == curheight`.
This commit is contained in:
parent
6025c13a6d
commit
a154481860
1 changed files with 4 additions and 0 deletions
|
@ -1305,7 +1305,11 @@ func (bc *Blockchain) verifyTxAttributes(tx *transaction.Transaction) error {
|
|||
// correctness, presence in blocks before the new one, etc.
|
||||
func (bc *Blockchain) isTxStillRelevant(t *transaction.Transaction, txpool *mempool.Pool) bool {
|
||||
var recheckWitness bool
|
||||
var curheight = bc.BlockHeight()
|
||||
|
||||
if t.ValidUntilBlock <= curheight {
|
||||
return false
|
||||
}
|
||||
if txpool == nil {
|
||||
if bc.dao.HasTransaction(t.Hash()) {
|
||||
return false
|
||||
|
|
Loading…
Reference in a new issue