hot fix in miner related to metadata calculation (#1159)

This commit is contained in:
Pratik Patil 2024-02-10 00:12:21 +05:30 committed by GitHub
parent f5a51afa04
commit d193b95e14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()
}