From 51897c9828aeb1ef55315e708c54249e5645980b Mon Sep 17 00:00:00 2001 From: Pratik Patil Date: Thu, 12 Oct 2023 07:17:30 +0530 Subject: [PATCH 1/3] do not hardcode EnableMVHashMap as false --- miner/worker.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/miner/worker.go b/miner/worker.go index da27492847..f8087fc8a1 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -1070,7 +1070,13 @@ func (w *worker) commitTransactions(env *environment, txs *types.TransactionsByP var depsWg sync.WaitGroup - EnableMVHashMap := false + var EnableMVHashMap bool + + if w.chainConfig.Bor.IsParallelUniverse(env.header.Number) { + EnableMVHashMap = true + } else { + EnableMVHashMap = false + } // create and add empty mvHashMap in statedb if EnableMVHashMap { From 31994a53f134b26408ceafccdd71a813ff7570db Mon Sep 17 00:00:00 2001 From: Pratik Patil Date: Thu, 12 Oct 2023 10:41:19 +0530 Subject: [PATCH 2/3] addressed comment --- miner/worker.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/miner/worker.go b/miner/worker.go index f8087fc8a1..8dd164a35f 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -1072,11 +1072,7 @@ func (w *worker) commitTransactions(env *environment, txs *types.TransactionsByP var EnableMVHashMap bool - if w.chainConfig.Bor.IsParallelUniverse(env.header.Number) { - EnableMVHashMap = true - } else { - EnableMVHashMap = false - } + EnableMVHashMap = w.chainConfig.Bor.IsParallelUniverse(env.header.Number) // create and add empty mvHashMap in statedb if EnableMVHashMap { From 916e59e5d0977d93282bb48bc430420f3632a525 Mon Sep 17 00:00:00 2001 From: Pratik Patil Date: Thu, 12 Oct 2023 12:23:46 +0530 Subject: [PATCH 3/3] lint --- miner/worker.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/miner/worker.go b/miner/worker.go index 8dd164a35f..ae1e92c070 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -1070,9 +1070,7 @@ func (w *worker) commitTransactions(env *environment, txs *types.TransactionsByP var depsWg sync.WaitGroup - var EnableMVHashMap bool - - EnableMVHashMap = w.chainConfig.Bor.IsParallelUniverse(env.header.Number) + EnableMVHashMap := w.chainConfig.Bor.IsParallelUniverse(env.header.Number) // create and add empty mvHashMap in statedb if EnableMVHashMap {