mempool: fix Remove bug (dropping wrong tx!)

Uncovered by TestMemPoolAddRemoveWithInputsAndClaims (to be added later)
This commit is contained in:
Roman Khimov 2020-02-27 13:40:58 +03:00
parent 7d59fa0066
commit f329de73e8

View file

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