aboutsummaryrefslogtreecommitdiffstats
path: root/pow/dagger
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-05-07 02:20:54 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-05-07 02:20:54 +0800
commit1f26a1b86319f9468395e0772b5ae8f02cce8ec8 (patch)
tree3aa5255e7d82f4161b26bc60425fa0b026516007 /pow/dagger
parentaa884c052ddf7c5e8f673972b34681982de1cd52 (diff)
parent054947def77bc2352f90f79206146c93dd5422d0 (diff)
downloaddexon-1f26a1b86319f9468395e0772b5ae8f02cce8ec8.tar
dexon-1f26a1b86319f9468395e0772b5ae8f02cce8ec8.tar.gz
dexon-1f26a1b86319f9468395e0772b5ae8f02cce8ec8.tar.bz2
dexon-1f26a1b86319f9468395e0772b5ae8f02cce8ec8.tar.lz
dexon-1f26a1b86319f9468395e0772b5ae8f02cce8ec8.tar.xz
dexon-1f26a1b86319f9468395e0772b5ae8f02cce8ec8.tar.zst
dexon-1f26a1b86319f9468395e0772b5ae8f02cce8ec8.zip
Merge pull request #859 from Gustav-Simonsson/ethash_reloaded
Ethash reloaded
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 {