From ecbc039b69144b1f0d6dcb99f2fea54adfe69207 Mon Sep 17 00:00:00 2001 From: Andrew Ashikhmin <34320705+yperbasis@users.noreply.github.com> Date: Sat, 23 Jul 2022 17:21:21 +0200 Subject: [PATCH] Revert "Added report bad transaction (#541)" (#543) This reverts commit 1331bb661a2283af428287c6a192135e355664ec. --- txpool/pool.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/txpool/pool.go b/txpool/pool.go index 05b5e9e20..84acbede9 100644 --- a/txpool/pool.go +++ b/txpool/pool.go @@ -636,20 +636,6 @@ func (p *TxPool) Best(n uint16, txs *types.TxsRlp, tx kv.Tx) error { return nil } -// ReportBadTransaction - reports a bad tx in the txpool due for removal. -func (p *TxPool) ReportBadTransaction(txHash [32]byte) { - p.lock.RLock() - defer p.lock.RUnlock() - - best := p.pending.best - for i := 0; i < len(best.ms); i++ { - if bytes.Equal(best.ms[i].Tx.IDHash[:], txHash[:]) { - p.pending.Remove(best.ms[i]) - return - } - } -} - func (p *TxPool) CountContent() (int, int, int) { p.lock.RLock() defer p.lock.RUnlock()