From f329de73e8f4210a01e8bf131ed06bbe4f6d344d Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Thu, 27 Feb 2020 13:40:58 +0300 Subject: [PATCH] mempool: fix Remove bug (dropping wrong tx!) Uncovered by TestMemPoolAddRemoveWithInputsAndClaims (to be added later) --- pkg/core/mempool/mem_pool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/core/mempool/mem_pool.go b/pkg/core/mempool/mem_pool.go index 9a99a1774..aef30d5bb 100644 --- a/pkg/core/mempool/mem_pool.go +++ b/pkg/core/mempool/mem_pool.go @@ -187,7 +187,7 @@ func (mp *Pool) Remove(hash util.Uint256) { if _, ok := mp.verifiedMap[hash]; ok { var num int delete(mp.verifiedMap, hash) - for num := range mp.verifiedTxes { + for num = range mp.verifiedTxes { if hash.Equals(mp.verifiedTxes[num].txn.Hash()) { break }