Skip to content

Commit

Permalink
fix: oom of mev bid env
Browse files Browse the repository at this point in the history
  • Loading branch information
irrun committed Apr 28, 2024
1 parent 236b39a commit 13b7211
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion miner/bid_simulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func (b *bidSimulator) SetBestBid(prevBlockHash common.Hash, bid *BidRuntime) {

// must discard the environment of the last best bid, otherwise it will cause memory leak
last := b.bestBid[prevBlockHash]
if last != nil {
if last != nil && last.env != nil {
last.env.discard()
}

Expand Down

0 comments on commit 13b7211

Please sign in to comment.