aboutsummaryrefslogtreecommitdiffstats
path: root/eth/protocol_test.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-21 00:42:25 +0800
committerobscuren <geffobscura@gmail.com>2015-03-21 00:42:25 +0800
commit1821d1af48e5fa11eb81fe7f6e5372737bb36ec9 (patch)
treed534f2059f6c14ac7f2dd1ab9996ef0cd4c34b95 /eth/protocol_test.go
parenta59bb053f4d2a4a28341c645c051c4c323581a1b (diff)
parent66b29899c474abeab6c66060c9ea5bbff85b9efb (diff)
downloaddexon-1821d1af48e5fa11eb81fe7f6e5372737bb36ec9.tar
dexon-1821d1af48e5fa11eb81fe7f6e5372737bb36ec9.tar.gz
dexon-1821d1af48e5fa11eb81fe7f6e5372737bb36ec9.tar.bz2
dexon-1821d1af48e5fa11eb81fe7f6e5372737bb36ec9.tar.lz
dexon-1821d1af48e5fa11eb81fe7f6e5372737bb36ec9.tar.xz
dexon-1821d1af48e5fa11eb81fe7f6e5372737bb36ec9.tar.zst
dexon-1821d1af48e5fa11eb81fe7f6e5372737bb36ec9.zip
Merge branch 'frontier/blockpool' of https://github.com/ethersphere/go-ethereum into ethersphere-frontier/blockpool
Diffstat (limited to 'eth/protocol_test.go')
-rw-r--r--eth/protocol_test.go13
1 files changed, 3 insertions, 10 deletions
diff --git a/eth/protocol_test.go b/eth/protocol_test.go
index 7620b3854..8ca6d1be6 100644
--- a/eth/protocol_test.go
+++ b/eth/protocol_test.go
@@ -41,17 +41,10 @@ type testChainManager struct {
type testBlockPool struct {
addBlockHashes func(next func() (common.Hash, bool), peerId string)
addBlock func(block *types.Block, peerId string) (err error)
- addPeer func(td *big.Int, currentBlock common.Hash, peerId string, requestHashes func(common.Hash) error, requestBlocks func([]common.Hash) error, peerError func(*errs.Error)) (best bool)
+ addPeer func(td *big.Int, currentBlock common.Hash, peerId string, requestHashes func(common.Hash) error, requestBlocks func([]common.Hash) error, peerError func(*errs.Error)) (best bool, suspended bool)
removePeer func(peerId string)
}
-// func (self *testTxPool) GetTransactions() (txs []*types.Transaction) {
-// if self.getTransactions != nil {
-// txs = self.getTransactions()
-// }
-// return
-// }
-
func (self *testTxPool) AddTransactions(txs []*types.Transaction) {
if self.addTransactions != nil {
self.addTransactions(txs)
@@ -93,9 +86,9 @@ func (self *testBlockPool) AddBlock(block *types.Block, peerId string) {
}
}
-func (self *testBlockPool) AddPeer(td *big.Int, currentBlock common.Hash, peerId string, requestBlockHashes func(common.Hash) error, requestBlocks func([]common.Hash) error, peerError func(*errs.Error)) (best bool) {
+func (self *testBlockPool) AddPeer(td *big.Int, currentBlock common.Hash, peerId string, requestBlockHashes func(common.Hash) error, requestBlocks func([]common.Hash) error, peerError func(*errs.Error)) (best bool, suspended bool) {
if self.addPeer != nil {
- best = self.addPeer(td, currentBlock, peerId, requestBlockHashes, requestBlocks, peerError)
+ best, suspended = self.addPeer(td, currentBlock, peerId, requestBlockHashes, requestBlocks, peerError)
}
return
}