eth: Make a copy of pending state so we don't accidentally modify it

This commit is contained in:
Nick Johnson 2016-10-18 15:47:22 +01:00
parent 5b262ff5ab
commit 6280739e5d

View file

@ -169,7 +169,7 @@ func (self *worker) pending() (*types.Block, *state.StateDB) {
self.current.txs, self.current.txs,
nil, nil,
self.current.receipts, self.current.receipts,
), self.current.state ), self.current.state.Copy()
} }
return self.current.Block, self.current.state.Copy() return self.current.Block, self.current.state.Copy()
} }