From 9fb848a2859f35856a65618a6ec76c90cae81dd8 Mon Sep 17 00:00:00 2001 From: irrun Date: Mon, 24 Jun 2024 14:45:21 +0800 Subject: [PATCH] fix: nil pointer when clear simulating bid --- miner/bid_simulator.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/miner/bid_simulator.go b/miner/bid_simulator.go index e80dc90b13..fa0cd0e9a8 100644 --- a/miner/bid_simulator.go +++ b/miner/bid_simulator.go @@ -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 {