aboutsummaryrefslogtreecommitdiffstats
path: root/dagger.go
diff options
context:
space:
mode:
Diffstat (limited to 'dagger.go')
-rw-r--r--dagger.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/dagger.go b/dagger.go
index 2c1976840..5aa5dd755 100644
--- a/dagger.go
+++ b/dagger.go
@@ -6,6 +6,7 @@ import (
"time"
"github.com/obscuren/sha3"
"hash"
+ "github.com/ethereum/ethutil-go"
)
type Dagger struct {
@@ -40,7 +41,7 @@ func (dag *Dagger) Search(hash, diff *big.Int) *big.Int {
dag.hash = hash
- obj := BigPow(2, 256)
+ obj := ethutil.BigPow(2, 256)
obj = obj.Div(obj, diff)
Found = false
@@ -66,7 +67,7 @@ func DaggerVerify(hash, diff, nonce *big.Int) bool {
dagger := &Dagger{}
dagger.hash = hash
- obj := BigPow(2, 256)
+ obj := ethutil.BigPow(2, 256)
obj = obj.Div(obj, diff)
return dagger.Eval(nonce).Cmp(obj) < 0
@@ -114,7 +115,7 @@ func Sum(sha hash.Hash) []byte {
}
func (dag *Dagger) Eval(N *big.Int) *big.Int {
- pow := BigPow(2, 26)
+ pow := ethutil.BigPow(2, 26)
dag.xn = N.Div(N, pow)
sha := sha3.NewKeccak256()