aboutsummaryrefslogtreecommitdiffstats
path: root/pow/dagger
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/dagger
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/dagger')
-rw-r--r--pow/dagger/dagger.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pow/dagger/dagger.go b/pow/dagger/dagger.go
index f2d65e8ef..b941c0eeb 100644
--- a/pow/dagger/dagger.go
+++ b/pow/dagger/dagger.go
@@ -6,8 +6,8 @@ import (
"math/rand"
"time"
- "github.com/ethereum/go-ethereum/crypto/sha3"
"github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/crypto/sha3"
"github.com/ethereum/go-ethereum/logger"
)
@@ -44,7 +44,7 @@ func (dag *Dagger) Find(obj *big.Int, resChan chan int64) {
resChan <- 0
}
-func (dag *Dagger) Search(hash, diff *big.Int) ([]byte, []byte, []byte) {
+func (dag *Dagger) Search(hash, diff *big.Int) (uint64, []byte) {
// TODO fix multi threading. Somehow it results in the wrong nonce
amountOfRoutines := 1
@@ -69,7 +69,7 @@ func (dag *Dagger) Search(hash, diff *big.Int) ([]byte, []byte, []byte) {
}
}
- return big.NewInt(res).Bytes(), nil, nil
+ return uint64(res), nil
}
func (dag *Dagger) Verify(hash, diff, nonce *big.Int) bool {