diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-06-30 08:22:19 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-06-30 08:22:19 +0800 |
commit | 7625b07dd9a2a7b5c5a504c1276eea04596ac871 (patch) | |
tree | ce2a757cd4e0591fc15815b2dfae528ae517d36e /miner/agent.go | |
parent | 72e2613a9fe3205fa5a67b72b832e03b2357ee88 (diff) | |
parent | 8f504063f465e0ca10c6bb53ee914d10a3d45c86 (diff) | |
download | go-tangerine-7625b07dd9a2a7b5c5a504c1276eea04596ac871.tar go-tangerine-7625b07dd9a2a7b5c5a504c1276eea04596ac871.tar.gz go-tangerine-7625b07dd9a2a7b5c5a504c1276eea04596ac871.tar.bz2 go-tangerine-7625b07dd9a2a7b5c5a504c1276eea04596ac871.tar.lz go-tangerine-7625b07dd9a2a7b5c5a504c1276eea04596ac871.tar.xz go-tangerine-7625b07dd9a2a7b5c5a504c1276eea04596ac871.tar.zst go-tangerine-7625b07dd9a2a7b5c5a504c1276eea04596ac871.zip |
Merge branch 'release/0.9.34'v0.9.34
Diffstat (limited to 'miner/agent.go')
-rw-r--r-- | miner/agent.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/miner/agent.go b/miner/agent.go index 3ed3ba839..a7d017aa5 100644 --- a/miner/agent.go +++ b/miner/agent.go @@ -90,15 +90,13 @@ done: } } -func (self *CpuAgent) mine(block *types.Block, stop <- chan struct{}) { +func (self *CpuAgent) mine(block *types.Block, stop <-chan struct{}) { glog.V(logger.Debug).Infof("(re)started agent[%d]. mining...\n", self.index) // Mine nonce, mixDigest := self.pow.Search(block, stop) if nonce != 0 { - block.SetNonce(nonce) - block.Header().MixDigest = common.BytesToHash(mixDigest) - self.returnCh <- block + self.returnCh <- block.WithMiningResult(nonce, common.BytesToHash(mixDigest)) } else { self.returnCh <- nil } |