Skip to content

Commit

Permalink
fix: fix core.TriesInMemory to b.chain.TriesInMemory() in bidSimulator
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjunLi committed Jul 22, 2024
1 parent 794df54 commit 31b0965
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions miner/bid_simulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ func (b *bidSimulator) clearLoop() {
}
delete(b.bestBid, parentHash)
for k, v := range b.bestBid {
if v.bid.BlockNumber <= blockNumber-core.TriesInMemory {
if v.bid.BlockNumber <= blockNumber-b.chain.TriesInMemory() {
v.env.discard()
delete(b.bestBid, k)
}
Expand All @@ -418,7 +418,7 @@ func (b *bidSimulator) clearLoop() {

b.simBidMu.Lock()
for k, v := range b.simulatingBid {
if v.bid.BlockNumber <= blockNumber-core.TriesInMemory {
if v.bid.BlockNumber <= blockNumber-b.chain.TriesInMemory() {
v.env.discard()
delete(b.simulatingBid, k)
}
Expand Down

0 comments on commit 31b0965

Please sign in to comment.