aboutsummaryrefslogtreecommitdiffstats
path: root/pow/ezp/pow.go
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2015-05-05 14:24:15 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2015-05-05 14:24:15 +0800
commitb1cc9cdc7424d452687e2e168027d591ed332f3f (patch)
tree85f9860c5348f7cce620349977e4dac5ab5140f8 /pow/ezp/pow.go
parent50659f4b480fb9446cfb40955331a7a044353ff8 (diff)
downloaddexon-b1cc9cdc7424d452687e2e168027d591ed332f3f.tar.gz
dexon-b1cc9cdc7424d452687e2e168027d591ed332f3f.tar.zst
dexon-b1cc9cdc7424d452687e2e168027d591ed332f3f.zip
Integrate new ethash API and change geth makedag cmd
Diffstat (limited to 'pow/ezp/pow.go')
-rw-r--r--pow/ezp/pow.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pow/ezp/pow.go b/pow/ezp/pow.go
index bd2927fe8..c838dd5ec 100644
--- a/pow/ezp/pow.go
+++ b/pow/ezp/pow.go
@@ -32,7 +32,7 @@ func (pow *EasyPow) Turbo(on bool) {
pow.turbo = on
}
-func (pow *EasyPow) Search(block pow.Block, stop <-chan struct{}) (uint64, []byte, []byte) {
+func (pow *EasyPow) Search(block pow.Block, stop <-chan struct{}) (uint64, []byte) {
r := rand.New(rand.NewSource(time.Now().UnixNano()))
hash := block.HashNoNonce()
diff := block.Difficulty()
@@ -57,7 +57,7 @@ empty:
for {
select {
case <-stop:
- return 0, nil, nil
+ return 0, nil
default:
i++
@@ -67,7 +67,7 @@ empty:
sha := uint64(r.Int63())
if verify(hash, diff, sha) {
- return sha, nil, nil
+ return sha, nil
}
}
@@ -76,7 +76,7 @@ empty:
}
}
- return 0, nil, nil
+ return 0, nil
}
func (pow *EasyPow) Verify(block pow.Block) bool {