diff options
author | obscuren <geffobscura@gmail.com> | 2014-11-18 23:58:22 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-11-18 23:58:22 +0800 |
commit | a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b (patch) | |
tree | aee891c8f02591e16377a6bf047c13f12d6d5123 /chain/dagger.go | |
parent | 62cd9946ee16758a4e368cd0b5a0ba9fa4d94705 (diff) | |
download | dexon-a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b.tar dexon-a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b.tar.gz dexon-a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b.tar.bz2 dexon-a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b.tar.lz dexon-a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b.tar.xz dexon-a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b.tar.zst dexon-a1b6a9ac29d0aa8d29a2c0535bafdb5fe4d4830b.zip |
Begin of moving objects to types package
* Block(s)
* Transaction(s)
Diffstat (limited to 'chain/dagger.go')
-rw-r--r-- | chain/dagger.go | 5 |
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 |