aboutsummaryrefslogtreecommitdiffstats
path: root/les/odr_test.go
diff options
context:
space:
mode:
authorFelföldi Zsolt <zsfelfoldi@gmail.com>2017-03-23 03:44:22 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-03-23 03:44:22 +0800
commit525116dbff916825463931361f75e75e955c12e2 (patch)
treeb272801c420ad9a591f227919567c7952b0bd512 /les/odr_test.go
parent1c1dc0e0fc41d871aa17377d407515f437d3a54d (diff)
downloaddexon-525116dbff916825463931361f75e75e955c12e2.tar
dexon-525116dbff916825463931361f75e75e955c12e2.tar.gz
dexon-525116dbff916825463931361f75e75e955c12e2.tar.bz2
dexon-525116dbff916825463931361f75e75e955c12e2.tar.lz
dexon-525116dbff916825463931361f75e75e955c12e2.tar.xz
dexon-525116dbff916825463931361f75e75e955c12e2.tar.zst
dexon-525116dbff916825463931361f75e75e955c12e2.zip
les: implement request distributor, fix blocking issues (#3660)
* les: implement request distributor, fix blocking issues * core: moved header validation before chain mutex lock
Diffstat (limited to 'les/odr_test.go')
-rw-r--r--les/odr_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/les/odr_test.go b/les/odr_test.go
index 4f1fccb24..1b436b8e6 100644
--- a/les/odr_test.go
+++ b/les/odr_test.go
@@ -162,8 +162,11 @@ func testOdr(t *testing.T, protocol int, expFail uint64, fn odrTestFn) {
lpm, ldb, odr := newTestProtocolManagerMust(t, true, 0, nil)
_, err1, lpeer, err2 := newTestPeerPair("peer", protocol, pm, lpm)
pool := &testServerPool{}
+ lpm.reqDist = newRequestDistributor(pool.getAllPeers, lpm.quitSync)
+ odr.reqDist = lpm.reqDist
pool.setPeer(lpeer)
odr.serverPool = pool
+ lpeer.hasBlock = func(common.Hash, uint64) bool { return true }
select {
case <-time.After(time.Millisecond * 100):
case err := <-err1: