diff options
author | zelig <viktor.tron@gmail.com> | 2014-12-10 12:12:25 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2014-12-15 04:39:34 +0800 |
commit | 5e4d77b2b8020a106a13762c49ef40acac619a9c (patch) | |
tree | b97b5a4b34e4d06ad78111ce75af620865e6a1f7 /eth/block_pool.go | |
parent | 2dd8f411473f23e61983506aaa1c37efec043ac0 (diff) | |
download | dexon-5e4d77b2b8020a106a13762c49ef40acac619a9c.tar.gz dexon-5e4d77b2b8020a106a13762c49ef40acac619a9c.tar.zst dexon-5e4d77b2b8020a106a13762c49ef40acac619a9c.zip |
initial commit for eth blockpool + test
Diffstat (limited to 'eth/block_pool.go')
-rw-r--r-- | eth/block_pool.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/eth/block_pool.go b/eth/block_pool.go index 64d1e73fa..7cfbc63f8 100644 --- a/eth/block_pool.go +++ b/eth/block_pool.go @@ -11,6 +11,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethutil" ethlogger "github.com/ethereum/go-ethereum/logger" + "github.com/ethereum/go-ethereum/pow" ) var poolLogger = ethlogger.NewLogger("Blockpool") @@ -54,7 +55,7 @@ type BlockPool struct { // the minimal interface with blockchain hasBlock func(hash []byte) bool insertChain func(types.Blocks) error - verifyPoW func(*types.Block) bool + verifyPoW func(pow.Block) bool } type peerInfo struct { @@ -73,7 +74,7 @@ type peerInfo struct { quitC chan bool } -func NewBlockPool(hasBlock func(hash []byte) bool, insertChain func(types.Blocks) error, verifyPoW func(*types.Block) bool, +func NewBlockPool(hasBlock func(hash []byte) bool, insertChain func(types.Blocks) error, verifyPoW func(pow.Block) bool, ) *BlockPool { return &BlockPool{ hasBlock: hasBlock, |