core: Fix flaw where underpriced locals were removed (#15081)

* core: Fix flaw where underpriced locals were removed

* core: minor code cleanups for tx pool tests
This commit is contained in:
Martin Holst Swende
2017-09-04 11:48:36 +02:00
committed by Péter Szilágyi
parent 23b51a68cb
commit 1901521ed0
2 changed files with 62 additions and 1 deletions

View File

@ -435,6 +435,7 @@ func (l *txPricedList) Cap(threshold *big.Int, local *accountSet) types.Transact
}
// Stop the discards if we've reached the threshold
if tx.GasPrice().Cmp(threshold) >= 0 {
save = append(save, tx)
break
}
// Non stale transaction found, discard unless local