Skip to content

Commit

Permalink
do not use LRU cache for OOC transactions (#1094)
Browse files Browse the repository at this point in the history
  • Loading branch information
hexoscott authored Sep 3, 2024
1 parent 791891c commit a0fdc2b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions zk/txpool/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,8 @@ func (p *TxPool) addTxs(blockNum uint64, cacheView kvcache.CacheView, senders *s
pending.Remove(mt)
discard(mt, OverflowZkCounters)
sendersWithChangedState[mt.Tx.SenderID] = struct{}{}
// do not hold on to the discard reason for an OOC issue
p.discardReasonsLRU.Remove(string(mt.Tx.IDHash[:]))
}
p.overflowZkCounters = p.overflowZkCounters[:0]

Expand Down Expand Up @@ -1141,6 +1143,8 @@ func (p *TxPool) addTxsOnNewBlock(
pending.Remove(mt)
discard(mt, OverflowZkCounters)
sendersWithChangedState[mt.Tx.SenderID] = struct{}{}
// do not hold on to the discard reason for an OOC issue
p.discardReasonsLRU.Remove(string(mt.Tx.IDHash[:]))
}
p.overflowZkCounters = p.overflowZkCounters[:0]

Expand Down

0 comments on commit a0fdc2b

Please sign in to comment.