diff options
author | Péter Szilágyi <peterke@gmail.com> | 2017-03-23 16:56:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-23 16:56:12 +0800 |
commit | 61d2150a0750a554250c3bf090ef994be6c060f0 (patch) | |
tree | 56dd67f447fcc2992cf88ef68b074799f9c1468c /pow/ethash_algo.go | |
parent | 3fa0fa713bc1508835bdecd7dea78ff09803e327 (diff) | |
parent | 24dd0355a34a40b1798c9b8bd97a7332a77e2556 (diff) | |
download | go-tangerine-61d2150a0750a554250c3bf090ef994be6c060f0.tar go-tangerine-61d2150a0750a554250c3bf090ef994be6c060f0.tar.gz go-tangerine-61d2150a0750a554250c3bf090ef994be6c060f0.tar.bz2 go-tangerine-61d2150a0750a554250c3bf090ef994be6c060f0.tar.lz go-tangerine-61d2150a0750a554250c3bf090ef994be6c060f0.tar.xz go-tangerine-61d2150a0750a554250c3bf090ef994be6c060f0.tar.zst go-tangerine-61d2150a0750a554250c3bf090ef994be6c060f0.zip |
Merge pull request #3795 from fjl/pow-fix-test-mode
pow: fix Search with ethash test mode
Diffstat (limited to 'pow/ethash_algo.go')
-rw-r--r-- | pow/ethash_algo.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pow/ethash_algo.go b/pow/ethash_algo.go index 3737cc5d7..1e996785f 100644 --- a/pow/ethash_algo.go +++ b/pow/ethash_algo.go @@ -349,12 +349,12 @@ func hashimotoLight(size uint64, cache []uint32, hash []byte, nonce uint64) ([]b // hashimotoFull aggregates data from the full dataset (using the full in-memory // dataset) in order to produce our final value for a particular header hash and // nonce. -func hashimotoFull(size uint64, dataset []uint32, hash []byte, nonce uint64) ([]byte, []byte) { +func hashimotoFull(dataset []uint32, hash []byte, nonce uint64) ([]byte, []byte) { lookup := func(index uint32) []uint32 { offset := index * hashWords return dataset[offset : offset+hashWords] } - return hashimoto(hash, nonce, size, lookup) + return hashimoto(hash, nonce, uint64(len(dataset))*4, lookup) } // datasetSizes is a lookup table for the ethash dataset size for the first 2048 |