Commit c9471e77 authored by Nick Johnson's avatar Nick Johnson Committed by Felix Lange

miner: copy pending state before handing it to callers (#3162)

The pending state was not copied while not mining, leading to a data race.
parent 5b262ff5
......@@ -169,7 +169,7 @@ func (self *worker) pending() (*types.Block, *state.StateDB) {
self.current.txs,
nil,
self.current.receipts,
), self.current.state
), self.current.state.Copy()
}
return self.current.Block, self.current.state.Copy()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment