aboutsummaryrefslogtreecommitdiffstats
path: root/miner/agent.go
diff options
context:
space:
mode:
Diffstat (limited to 'miner/agent.go')
-rw-r--r--miner/agent.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/miner/agent.go b/miner/agent.go
index 16f2a7723..697e3971b 100644
--- a/miner/agent.go
+++ b/miner/agent.go
@@ -22,6 +22,7 @@ import (
"sync/atomic"
"github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/logger/glog"
"github.com/ethereum/go-ethereum/pow"
@@ -112,7 +113,7 @@ func (self *CpuAgent) mine(work *Work, stop <-chan struct{}) {
// Mine
nonce, mixDigest := self.pow.Search(work.Block, stop, self.index)
if nonce != 0 {
- block := work.Block.WithMiningResult(nonce, common.BytesToHash(mixDigest))
+ block := work.Block.WithMiningResult(types.EncodeNonce(nonce), common.BytesToHash(mixDigest))
self.returnCh <- &Result{work, block}
} else {
self.returnCh <- nil