Skip to content

Commit

Permalink
fix: nil pointer when clear simulating bid
Browse files Browse the repository at this point in the history
  • Loading branch information
irrun committed Jun 24, 2024
1 parent 1548452 commit 9fb848a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion miner/bid_simulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,9 @@ func (b *bidSimulator) clearLoop() {

b.simBidMu.Lock()
if bid, ok := b.simulatingBid[parentHash]; ok {
bid.env.discard()
if bid.env != nil {
bid.env.discard()
}
}
delete(b.simulatingBid, parentHash)
for k, v := range b.simulatingBid {
Expand Down

0 comments on commit 9fb848a

Please sign in to comment.