mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-01 00:31:21 +00:00
evict
This commit is contained in:
parent
d9dae8199b
commit
7a48420c8f
@ -337,20 +337,22 @@ 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)
|
||||
/*
|
||||
// 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)
|
||||
}
|
||||
delete(p.senderInfo, i)
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user