aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-14 01:15:23 +0800
committerobscuren <geffobscura@gmail.com>2015-02-14 01:15:23 +0800
commitce239333d529898edd8333637fd75c565e80a9ff (patch)
tree763f273cff09726bb16acf715d5ce0e2908e0b8f /miner
parent0f3c25b26589f5667b618d6a91b73392d02ccd1e (diff)
downloaddexon-ce239333d529898edd8333637fd75c565e80a9ff.tar.gz
dexon-ce239333d529898edd8333637fd75c565e80a9ff.tar.zst
dexon-ce239333d529898edd8333637fd75c565e80a9ff.zip
Update balance label when mining
Diffstat (limited to 'miner')
-rw-r--r--miner/worker.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/miner/worker.go b/miner/worker.go
index 9cb4ab76b..9244e06b9 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -127,7 +127,8 @@ out:
func (self *worker) wait() {
for {
for work := range self.recv {
- if self.current.block.Number().Uint64() == work.Number {
+ block := self.current.block
+ if block.Number().Uint64() == work.Number && block.Nonce() == nil {
self.current.block.Header().Nonce = work.Nonce
self.chain.InsertChain(types.Blocks{self.current.block})