aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/blockchain.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/blockchain.go b/core/blockchain.go
index e6d7cdc76..99f99b64d 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -1818,7 +1818,6 @@ func (bc *BlockChain) ProcessBlock(block *types.Block, witness *coreTypes.Witnes
func (bc *BlockChain) processBlock(
block *types.Block, witness *coreTypes.Witness) (*common.Hash, []interface{}, []*types.Log, error) {
- // Pre-checks passed, start the full block imports
bc.wg.Add(1)
defer bc.wg.Done()
@@ -1941,6 +1940,12 @@ func (bc *BlockChain) processBlock(
}
func (bc *BlockChain) ProcessEmptyBlock(block *types.Block) (*common.Hash, error) {
+ bc.wg.Add(1)
+ defer bc.wg.Done()
+
+ bc.chainmu.Lock()
+ defer bc.chainmu.Unlock()
+
bstart := time.Now()
var stats = insertStats{startTime: mclock.Now()}
var header = block.Header()