mirror of https://github.com/poanetwork/quorum.git
Adding a lock around WriteBlockWithState while processing sealing result
This commit is contained in:
parent
2d22fd0044
commit
9dbafd38c5
|
@ -605,7 +605,9 @@ func (w *worker) resultLoop() {
|
|||
allReceipts := mergeReceipts(work.receipts, work.privateReceipts)
|
||||
|
||||
// Commit block and state to database.
|
||||
w.mu.Lock()
|
||||
stat, err := w.chain.WriteBlockWithState(block, allReceipts, work.state, nil)
|
||||
w.mu.Unlock()
|
||||
if err != nil {
|
||||
log.Error("Failed writWriteBlockAndStating block to chain", "err", err)
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue