diff options
-rw-r--r-- | miner/worker.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/miner/worker.go b/miner/worker.go index e4e42f877..34329f849 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -316,7 +316,9 @@ func (self *worker) wait() { for _, log := range work.state.Logs() { log.BlockHash = block.Hash() } + self.currentMu.Lock() stat, err := self.chain.WriteBlockWithState(block, work.receipts, work.state) + self.currentMu.Unlock() if err != nil { log.Error("Failed writing block to chain", "err", err) continue |