aboutsummaryrefslogtreecommitdiffstats
path: root/pow
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-06 01:13:35 +0800
committerobscuren <geffobscura@gmail.com>2015-02-06 02:58:43 +0800
commitac695387075fdd9214ef8de71ac6897136a50ce8 (patch)
tree5a4bce7c79eebe56b3573892e30e96b1ed0936fd /pow
parent9d2166a964d83c09481dea6ef30889f260249295 (diff)
parentdb7c34a9df19d5a8a3a02a5e3d4cafcffa18dcb8 (diff)
downloaddexon-ac695387075fdd9214ef8de71ac6897136a50ce8.tar
dexon-ac695387075fdd9214ef8de71ac6897136a50ce8.tar.gz
dexon-ac695387075fdd9214ef8de71ac6897136a50ce8.tar.bz2
dexon-ac695387075fdd9214ef8de71ac6897136a50ce8.tar.lz
dexon-ac695387075fdd9214ef8de71ac6897136a50ce8.tar.xz
dexon-ac695387075fdd9214ef8de71ac6897136a50ce8.tar.zst
dexon-ac695387075fdd9214ef8de71ac6897136a50ce8.zip
Merge branch 'develop' into miner
Diffstat (limited to 'pow')
-rw-r--r--pow/block.go1
-rw-r--r--pow/ezp/pow.go3
2 files changed, 2 insertions, 2 deletions
diff --git a/pow/block.go b/pow/block.go
index 62df2b5ff..31e194d8d 100644
--- a/pow/block.go
+++ b/pow/block.go
@@ -6,4 +6,5 @@ type Block interface {
Difficulty() *big.Int
HashNoNonce() []byte
N() []byte
+ Number() *big.Int
}
diff --git a/pow/ezp/pow.go b/pow/ezp/pow.go
index 64d3230c9..e4caa076a 100644
--- a/pow/ezp/pow.go
+++ b/pow/ezp/pow.go
@@ -53,7 +53,6 @@ func (pow *EasyPow) Search(block pow.Block, stop <-chan struct{}) []byte {
elapsed := time.Now().UnixNano() - start
hashes := ((float64(1e9) / float64(elapsed)) * float64(i)) / 1000
pow.HashRate = int64(hashes)
- //powlogger.Infoln("Hashing @", pow.HashRate, "khash")
t = time.Now()
}
@@ -83,7 +82,7 @@ func verify(hash []byte, diff *big.Int, nonce []byte) bool {
sha.Write(d)
verification := new(big.Int).Div(ethutil.BigPow(2, 256), diff)
- res := ethutil.U256(ethutil.BigD(sha.Sum(nil)))
+ res := ethutil.BigD(sha.Sum(nil))
return res.Cmp(verification) <= 0
}