aboutsummaryrefslogtreecommitdiffstats
path: root/chain/dagger.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2014-11-27 20:23:31 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2014-11-27 20:23:31 +0800
commitef7961b7d27be930a4d9dc81527a55497d3dea2e (patch)
tree5746b715b1b66c5767779e2e4ca66be345333e13 /chain/dagger.go
parentc17a3cb0ceec44c10bc84d05f0d81f08894c792c (diff)
parent8cf9ed0ea588e97f2baf0f834248727e8fbca18f (diff)
downloaddexon-ef7961b7d27be930a4d9dc81527a55497d3dea2e.tar
dexon-ef7961b7d27be930a4d9dc81527a55497d3dea2e.tar.gz
dexon-ef7961b7d27be930a4d9dc81527a55497d3dea2e.tar.bz2
dexon-ef7961b7d27be930a4d9dc81527a55497d3dea2e.tar.lz
dexon-ef7961b7d27be930a4d9dc81527a55497d3dea2e.tar.xz
dexon-ef7961b7d27be930a4d9dc81527a55497d3dea2e.tar.zst
dexon-ef7961b7d27be930a4d9dc81527a55497d3dea2e.zip
Merge pull request #194 from ethereum/poc8
Update tests branch to PoC8
Diffstat (limited to 'chain/dagger.go')
-rw-r--r--chain/dagger.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/chain/dagger.go b/chain/dagger.go
index 2cf70e091..f7e2229e9 100644
--- a/chain/dagger.go
+++ b/chain/dagger.go
@@ -6,6 +6,7 @@ import (
"math/rand"
"time"
+ "github.com/ethereum/go-ethereum/chain/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/logger"
@@ -15,7 +16,7 @@ import (
var powlogger = logger.NewLogger("POW")
type PoW interface {
- Search(block *Block, stop <-chan struct{}) []byte
+ Search(block *types.Block, stop <-chan struct{}) []byte
Verify(hash []byte, diff *big.Int, nonce []byte) bool
GetHashrate() int64
Turbo(bool)
@@ -35,7 +36,7 @@ func (pow *EasyPow) Turbo(on bool) {
pow.turbo = on
}
-func (pow *EasyPow) Search(block *Block, stop <-chan struct{}) []byte {
+func (pow *EasyPow) Search(block *types.Block, stop <-chan struct{}) []byte {
r := rand.New(rand.NewSource(time.Now().UnixNano()))
hash := block.HashNoNonce()
diff := block.Difficulty