diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-21 01:01:05 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-21 01:01:05 +0800 |
commit | f4e9638867f5dab01eeb6db5fdbd85737a11fbd6 (patch) | |
tree | 8d8cbfeb2533a2b84e5f0927e9bfdd688cdffbb2 /eth/protocol_test.go | |
parent | 54dac59285ccc6a3af47201479ca556da2899e93 (diff) | |
parent | ecd10d2cf765072cd74347b9e0ca2bb85091450f (diff) | |
download | go-tangerine-f4e9638867f5dab01eeb6db5fdbd85737a11fbd6.tar.gz go-tangerine-f4e9638867f5dab01eeb6db5fdbd85737a11fbd6.tar.zst go-tangerine-f4e9638867f5dab01eeb6db5fdbd85737a11fbd6.zip |
Merge branch 'ethersphere-frontier/blockpool' into conversion
Diffstat (limited to 'eth/protocol_test.go')
-rw-r--r-- | eth/protocol_test.go | 13 |
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 } |