mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-05 13:06:20 +00:00
core: remove transactions from MemPool when they're stored in block
Extend MemPool with Remove() and use it. Fixes #446.
This commit is contained in:
parent
184d8a0180
commit
45cac07643
3 changed files with 100 additions and 0 deletions
|
@ -467,6 +467,9 @@ func (bc *Blockchain) storeBlock(block *Block) error {
|
|||
}
|
||||
|
||||
atomic.StoreUint32(&bc.blockHeight, block.Index)
|
||||
for _, tx := range block.Transactions {
|
||||
bc.memPool.Remove(tx.Hash())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue