Skip to content

Commit

Permalink
hot fix in miner related to metadata calculation (#1159)
Browse files Browse the repository at this point in the history
  • Loading branch information
pratikspatil024 authored Feb 9, 2024
1 parent f5a51af commit d193b95
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
}

Expand Down Expand Up @@ -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())

Expand Down Expand Up @@ -1085,7 +1085,7 @@ mainloop:
txs.Pop()
}

if EnableMVHashMap {
if EnableMVHashMap && w.IsRunning() {
env.state.ClearReadMap()
env.state.ClearWriteMap()
}
Expand Down

0 comments on commit d193b95

Please sign in to comment.