diff --git a/txpool/pool.go b/txpool/pool.go index 4ad2b3636..1f7b666eb 100644 --- a/txpool/pool.go +++ b/txpool/pool.go @@ -337,22 +337,20 @@ func (p *TxPool) OnNewBlock(tx kv.Tx, stateChanges map[string]senderInfo, unwind } } - /* - // evict sendersInfo without txs - if len(p.senderIDs) > MaxSendersInfoCache { - for i := range p.senderInfo { - if p.senderInfo[i].txNonce2Tx.Len() > 0 { - continue - } - for addr, id := range p.senderIDs { - if id == i { - delete(p.senderIDs, addr) - } - } - delete(p.senderInfo, i) + // evict sendersInfo without txs + if len(p.senderIDs) > MaxSendersInfoCache { + for i := range p.senderInfo { + if p.senderInfo[i].txNonce2Tx.Len() > 0 { + continue } + for addr, id := range p.senderIDs { + if id == i { + delete(p.senderIDs, addr) + } + } + delete(p.senderInfo, i) } - */ + } return nil }