mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
miner: Concurrent read/write during contract depoyment (fixes issue #16933)
This commit is contained in:
parent
c95e4a80d1
commit
07cecb1f7b
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue