les: fix panic in ultralight client sync (#24641)
This commit is contained in:
@ -55,7 +55,7 @@ func testULCAnnounceThreshold(t *testing.T, protocol int) {
|
||||
ids []string
|
||||
)
|
||||
for i := 0; i < len(testcase.height); i++ {
|
||||
s, n, teardown := newTestServerPeer(t, 0, protocol)
|
||||
s, n, teardown := newTestServerPeer(t, 0, protocol, nil)
|
||||
|
||||
servers = append(servers, s)
|
||||
nodes = append(nodes, n)
|
||||
@ -132,10 +132,11 @@ func connect(server *serverHandler, serverId enode.ID, client *clientHandler, pr
|
||||
}
|
||||
|
||||
// newTestServerPeer creates server peer.
|
||||
func newTestServerPeer(t *testing.T, blocks int, protocol int) (*testServer, *enode.Node, func()) {
|
||||
func newTestServerPeer(t *testing.T, blocks int, protocol int, indexFn indexerCallback) (*testServer, *enode.Node, func()) {
|
||||
netconfig := testnetConfig{
|
||||
blocks: blocks,
|
||||
protocol: protocol,
|
||||
indexFn: indexFn,
|
||||
nopruning: true,
|
||||
}
|
||||
s, _, teardown := newClientServerEnv(t, netconfig)
|
||||
|
Reference in New Issue
Block a user