core: more detailed metering for reorgs (#21420)

This commit is contained in:
Marius van der Wijden
2020-08-20 09:49:35 +02:00
committed by GitHub
parent 7ebc6c43ff
commit 0bdd295cc0
2 changed files with 8 additions and 2 deletions

View File

@ -1422,6 +1422,8 @@ func (pool *TxPool) demoteUnexecutables() {
pool.enqueueTx(hash, tx)
}
pendingGauge.Dec(int64(len(gapped)))
// This might happen in a reorg, so log it to the metering
blockReorgInvalidatedTx.Mark(int64(len(gapped)))
}
// Delete the entire pending entry if it became empty.
if list.Empty() {