diff options
author | obscuren <geffobscura@gmail.com> | 2014-08-01 16:30:19 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-08-01 16:30:19 +0800 |
commit | 2e7cf835222274a311302c33498cf83bb2593b7a (patch) | |
tree | 6689e7017a14d2198771fbe5148bb8ad13e9e8a1 /ethchain/dagger.go | |
parent | 5ede1224e48fd82961bd4a0b2ec1a3eda0b6d99b (diff) | |
parent | 8bed47a2d4377b7a49f34350ae5c5ea50464b95d (diff) | |
download | go-tangerine-2e7cf835222274a311302c33498cf83bb2593b7a.tar go-tangerine-2e7cf835222274a311302c33498cf83bb2593b7a.tar.gz go-tangerine-2e7cf835222274a311302c33498cf83bb2593b7a.tar.bz2 go-tangerine-2e7cf835222274a311302c33498cf83bb2593b7a.tar.lz go-tangerine-2e7cf835222274a311302c33498cf83bb2593b7a.tar.xz go-tangerine-2e7cf835222274a311302c33498cf83bb2593b7a.tar.zst go-tangerine-2e7cf835222274a311302c33498cf83bb2593b7a.zip |
Merge branch 'ethersphere-feature/ethutil-refactor' into develop
Diffstat (limited to 'ethchain/dagger.go')
-rw-r--r-- | ethchain/dagger.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ethchain/dagger.go b/ethchain/dagger.go index dccd2ff5b..917b3d722 100644 --- a/ethchain/dagger.go +++ b/ethchain/dagger.go @@ -3,6 +3,7 @@ package ethchain import ( "github.com/ethereum/eth-go/ethcrypto" "github.com/ethereum/eth-go/ethlog" + "github.com/ethereum/eth-go/ethreact" "github.com/ethereum/eth-go/ethutil" "github.com/obscuren/sha3" "hash" @@ -14,7 +15,7 @@ import ( var powlogger = ethlog.NewLogger("POW") type PoW interface { - Search(block *Block, reactChan chan ethutil.React) []byte + Search(block *Block, reactChan chan ethreact.Event) []byte Verify(hash []byte, diff *big.Int, nonce []byte) bool GetHashrate() int64 } @@ -28,7 +29,7 @@ func (pow *EasyPow) GetHashrate() int64 { return pow.HashRate } -func (pow *EasyPow) Search(block *Block, reactChan chan ethutil.React) []byte { +func (pow *EasyPow) Search(block *Block, reactChan chan ethreact.Event) []byte { r := rand.New(rand.NewSource(time.Now().UnixNano())) hash := block.HashNoNonce() diff := block.Difficulty |