les: limit state ODR retrievals to the last 100 blocks (#17744)

This commit is contained in:
Felföldi Zsolt
2018-10-01 15:14:53 +02:00
committed by Martin Holst Swende
parent 96fd50be10
commit b7bbe66b19
5 changed files with 26 additions and 19 deletions

View File

@ -115,7 +115,7 @@ func testAccess(t *testing.T, protocol int, fn accessTestFn) {
client.peers.Register(client.rPeer)
time.Sleep(time.Millisecond * 10) // ensure that all peerSetNotify callbacks are executed
client.rPeer.lock.Lock()
client.rPeer.hasBlock = func(common.Hash, uint64) bool { return true }
client.rPeer.hasBlock = func(common.Hash, uint64, bool) bool { return true }
client.rPeer.lock.Unlock()
// expect all retrievals to pass
test(5)