aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-05-11 22:11:33 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-05-11 22:11:33 +0800
commit8e77f81586e00553362eb48f3702ea8039839c40 (patch)
tree39874e35b9dd21c38fddc28434d826ea3832961f /miner
parent5176fbc6faaa5e7f0305ad7f2b896c092781deaa (diff)
downloadgo-tangerine-8e77f81586e00553362eb48f3702ea8039839c40.tar
go-tangerine-8e77f81586e00553362eb48f3702ea8039839c40.tar.gz
go-tangerine-8e77f81586e00553362eb48f3702ea8039839c40.tar.bz2
go-tangerine-8e77f81586e00553362eb48f3702ea8039839c40.tar.lz
go-tangerine-8e77f81586e00553362eb48f3702ea8039839c40.tar.xz
go-tangerine-8e77f81586e00553362eb48f3702ea8039839c40.tar.zst
go-tangerine-8e77f81586e00553362eb48f3702ea8039839c40.zip
Return 32-byte hashes from GetWork
Ensures that the Get Work results are a consistent length. Closes #917
Diffstat (limited to 'miner')
-rw-r--r--miner/remote_agent.go4
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