Merge pull request #1480 from nspcc-dev/fix-reverification-of-stale-txes

core: drop stale transactions from the mempool
This commit is contained in:
Roman Khimov 2020-10-12 15:54:28 +03:00 committed by GitHub
commit c72ecd1be4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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