aboutsummaryrefslogtreecommitdiffstats
path: root/miner/worker.go
diff options
context:
space:
mode:
Diffstat (limited to 'miner/worker.go')
-rw-r--r--miner/worker.go12
1 files changed, 3 insertions, 9 deletions
diff --git a/miner/worker.go b/miner/worker.go
index a5eec2601..b3ddf9707 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -152,13 +152,7 @@ func (self *worker) setEtherbase(addr common.Address) {
self.coinbase = addr
}
-func (self *worker) pendingState() *state.StateDB {
- self.currentMu.Lock()
- defer self.currentMu.Unlock()
- return self.current.state
-}
-
-func (self *worker) pendingBlock() *types.Block {
+func (self *worker) pending() (*types.Block, *state.StateDB) {
self.currentMu.Lock()
defer self.currentMu.Unlock()
@@ -168,9 +162,9 @@ func (self *worker) pendingBlock() *types.Block {
self.current.txs,
nil,
self.current.receipts,
- )
+ ), self.current.state
}
- return self.current.Block
+ return self.current.Block, self.current.state
}
func (self *worker) start() {