We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f1daed6 + 3029349 commit 482cc49Copy full SHA for 482cc49
miner/worker.go
@@ -160,6 +160,7 @@ func (self *worker) pendingState() *state.StateDB {
160
func (self *worker) pendingBlock() *types.Block {
161
self.currentMu.Lock()
162
defer self.currentMu.Unlock()
163
+
164
if atomic.LoadInt32(&self.mining) == 0 {
165
return types.NewBlock(
166
self.current.header,
@@ -228,9 +229,9 @@ out:
228
229
case core.TxPreEvent:
230
// Apply transaction to the pending state if we're not mining
231
- self.mu.Lock()
232
+ self.currentMu.Lock()
233
self.current.commitTransactions(types.Transactions{ev.Tx}, self.gasPrice, self.proc)
- self.mu.Unlock()
234
+ self.currentMu.Unlock()
235
}
236
237
case <-self.quit:
0 commit comments