diff options
author | Felix Lange <fjl@users.noreply.github.com> | 2016-12-13 03:46:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-13 03:46:15 +0800 |
commit | a98e8c0889d7c4c1bded452c577bd4b9c7fa0f6b (patch) | |
tree | faccd87d6e1634b51f788fa170bc1f03a829ca42 /les/helper_test.go | |
parent | ee445a2ba4013f8b32e4e5386322babf022e5b81 (diff) | |
parent | f12f8a6c14dbaf6e6531cea1b0cf169b851e1894 (diff) | |
download | dexon-a98e8c0889d7c4c1bded452c577bd4b9c7fa0f6b.tar dexon-a98e8c0889d7c4c1bded452c577bd4b9c7fa0f6b.tar.gz dexon-a98e8c0889d7c4c1bded452c577bd4b9c7fa0f6b.tar.bz2 dexon-a98e8c0889d7c4c1bded452c577bd4b9c7fa0f6b.tar.lz dexon-a98e8c0889d7c4c1bded452c577bd4b9c7fa0f6b.tar.xz dexon-a98e8c0889d7c4c1bded452c577bd4b9c7fa0f6b.tar.zst dexon-a98e8c0889d7c4c1bded452c577bd4b9c7fa0f6b.zip |
Merge pull request #3413 from zsfelfoldi/light-topic4
les, p2p/discv5: implement server pool, improve peer selection, light fetcher and topic searching
Diffstat (limited to 'les/helper_test.go')
-rw-r--r-- | les/helper_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/les/helper_test.go b/les/helper_test.go index a5428e954..2df3faab2 100644 --- a/les/helper_test.go +++ b/les/helper_test.go @@ -25,6 +25,7 @@ import ( "math/big" "sync" "testing" + "time" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" @@ -334,3 +335,13 @@ func (p *testPeer) handshake(t *testing.T, td *big.Int, head common.Hash, headNu func (p *testPeer) close() { p.app.Close() } + +type testServerPool peer + +func (p *testServerPool) selectPeer(func(*peer) (bool, uint64)) *peer { + return (*peer)(p) +} + +func (p *testServerPool) adjustResponseTime(*poolEntry, time.Duration, bool) { + +} |