diff options
author | Martin Holst Swende <martin@swende.se> | 2016-11-30 17:48:48 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-11-30 17:48:48 +0800 |
commit | 9f8bc00cf56bdf2cabf060303ed69f277a03357a (patch) | |
tree | 1d3e13d602c3ae2a0106fef23cc620aba4962f2c /miner/miner.go | |
parent | 3363a1c2277ccd3aee9e05850accd8c50e016bfa (diff) | |
download | go-tangerine-9f8bc00cf56bdf2cabf060303ed69f277a03357a.tar.gz go-tangerine-9f8bc00cf56bdf2cabf060303ed69f277a03357a.tar.zst go-tangerine-9f8bc00cf56bdf2cabf060303ed69f277a03357a.zip |
eth, miner: removed unnecessary state.Copy()
* miner: removed unnecessary state.Copy()
* eth: made use of new miner method without state copying
* miner: More documentation about new method
Diffstat (limited to 'miner/miner.go')
-rw-r--r-- | miner/miner.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/miner/miner.go b/miner/miner.go index c85a1cd8e..87568ac18 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -187,6 +187,15 @@ func (self *Miner) Pending() (*types.Block, *state.StateDB) { return self.worker.pending() } +// PendingBlock returns the currently pending block. +// +// Note, to access both the pending block and the pending state +// simultaneously, please use Pending(), as the pending state can +// change between multiple method calls +func (self *Miner) PendingBlock() *types.Block { + return self.worker.pendingBlock() +} + func (self *Miner) SetEtherbase(addr common.Address) { self.coinbase = addr self.worker.setEtherbase(addr) |