diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-11 22:43:56 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-05-11 22:43:56 +0800 |
commit | fe7e284709f079fb9ddee2d0d2667ba968db0558 (patch) | |
tree | cab3b2ecb50bc4d9fddee2bba671b630c843a5bb | |
parent | 0329e058231cd92e052ca7bb425ec28dd542aaee (diff) | |
parent | 8e77f81586e00553362eb48f3702ea8039839c40 (diff) | |
download | dexon-fe7e284709f079fb9ddee2d0d2667ba968db0558.tar dexon-fe7e284709f079fb9ddee2d0d2667ba968db0558.tar.gz dexon-fe7e284709f079fb9ddee2d0d2667ba968db0558.tar.bz2 dexon-fe7e284709f079fb9ddee2d0d2667ba968db0558.tar.lz dexon-fe7e284709f079fb9ddee2d0d2667ba968db0558.tar.xz dexon-fe7e284709f079fb9ddee2d0d2667ba968db0558.tar.zst dexon-fe7e284709f079fb9ddee2d0d2667ba968db0558.zip |
Merge pull request #920 from tgerring/issue917
Return 32-byte hashes from GetWork
-rw-r--r-- | miner/remote_agent.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/miner/remote_agent.go b/miner/remote_agent.go index 87456cfec..80cc9053e 100644 --- a/miner/remote_agent.go +++ b/miner/remote_agent.go @@ -64,13 +64,13 @@ func (a *RemoteAgent) GetWork() [3]string { res[0] = a.work.HashNoNonce().Hex() seedHash, _ := ethash.GetSeedHash(a.currentWork.NumberU64()) - res[1] = common.Bytes2Hex(seedHash) + res[1] = common.BytesToHash(seedHash).Hex() // Calculate the "target" to be returned to the external miner n := big.NewInt(1) n.Lsh(n, 255) n.Div(n, a.work.Difficulty()) n.Lsh(n, 1) - res[2] = common.Bytes2Hex(n.Bytes()) + res[2] = common.BytesToHash(n.Bytes()).Hex() } return res |