From d193b95e14e3bfc03645b8eedc96f26cf8ee3af6 Mon Sep 17 00:00:00 2001 From: Pratik Patil Date: Sat, 10 Feb 2024 00:12:21 +0530 Subject: [PATCH] hot fix in miner related to metadata calculation (#1159) --- miner/worker.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/miner/worker.go b/miner/worker.go index 3573eccfee..0e1dd83691 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -920,7 +920,7 @@ func (w *worker) commitTransactions(env *environment, txs *transactionsByPriceAn EnableMVHashMap := w.chainConfig.IsCancun(env.header.Number) // create and add empty mvHashMap in statedb - if EnableMVHashMap { + if EnableMVHashMap && w.IsRunning() { deps = map[int]map[int]bool{} chDeps = make(chan blockstm.TxDep) @@ -956,7 +956,7 @@ func (w *worker) commitTransactions(env *environment, txs *transactionsByPriceAn mainloop: for { if interruptCtx != nil { - if EnableMVHashMap { + if EnableMVHashMap && w.IsRunning() { env.state.AddEmptyMVHashMap() } @@ -1055,7 +1055,7 @@ mainloop: coalescedLogs = append(coalescedLogs, logs...) env.tcount++ - if EnableMVHashMap { + if EnableMVHashMap && w.IsRunning() { env.depsMVFullWriteList = append(env.depsMVFullWriteList, env.state.MVFullWriteList()) env.mvReadMapList = append(env.mvReadMapList, env.state.MVReadMap()) @@ -1085,7 +1085,7 @@ mainloop: txs.Pop() } - if EnableMVHashMap { + if EnableMVHashMap && w.IsRunning() { env.state.ClearReadMap() env.state.ClearWriteMap() }