fix: nil pointer when clear simulating bid (#2534)

This commit is contained in:
irrun 2024-06-24 16:42:17 +08:00 committed by GitHub
parent 1548452def
commit 55cbf31f18
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -419,10 +419,6 @@ func (b *bidSimulator) clearLoop() {
b.bestBidMu.Unlock()
b.simBidMu.Lock()
if bid, ok := b.simulatingBid[parentHash]; ok {
bid.env.discard()
}
delete(b.simulatingBid, parentHash)
for k, v := range b.simulatingBid {
if v.bid.BlockNumber <= blockNumber-core.TriesInMemory {
v.env.discard()