diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-03-16 17:20:02 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-03-16 17:23:26 +0800 |
commit | 0228fb57cd58147ab2c3914520c7805e25a8a1c4 (patch) | |
tree | 1540b12d2aa49ed869b2bb4bde5bd5b4c44532a0 /miner/miner.go | |
parent | 2855a93ede6e9437d05a82c2397d48744621db9b (diff) | |
download | go-tangerine-0228fb57cd58147ab2c3914520c7805e25a8a1c4.tar go-tangerine-0228fb57cd58147ab2c3914520c7805e25a8a1c4.tar.gz go-tangerine-0228fb57cd58147ab2c3914520c7805e25a8a1c4.tar.bz2 go-tangerine-0228fb57cd58147ab2c3914520c7805e25a8a1c4.tar.lz go-tangerine-0228fb57cd58147ab2c3914520c7805e25a8a1c4.tar.xz go-tangerine-0228fb57cd58147ab2c3914520c7805e25a8a1c4.tar.zst go-tangerine-0228fb57cd58147ab2c3914520c7805e25a8a1c4.zip |
eth, miner: fetch pending block/state in on go (data race)
Diffstat (limited to 'miner/miner.go')
-rw-r--r-- | miner/miner.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/miner/miner.go b/miner/miner.go index 6d4a84f1a..e52cefaab 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -164,12 +164,9 @@ func (self *Miner) SetExtra(extra []byte) error { return nil } -func (self *Miner) PendingState() *state.StateDB { - return self.worker.pendingState() -} - -func (self *Miner) PendingBlock() *types.Block { - return self.worker.pendingBlock() +// Pending returns the currently pending block and associated state. +func (self *Miner) Pending() (*types.Block, *state.StateDB) { + return self.worker.pending() } func (self *Miner) SetEtherbase(addr common.Address) { |