neutrino icon indicating copy to clipboard operation
neutrino copied to clipboard

Test flake: Timed out after 30s waiting for cfheaders synchronization.

Open halseth opened this issue 6 years ago • 0 comments

The following error is seen regularly during sync tests:

--- FAIL: TestNeutrinoSync (20.21s)
    --- FAIL: TestNeutrinoSync/initial_sync (31.05s)
        sync_test.go:288: Couldn't sync ChainService: Timed out after 30s waiting for cfheaders synchronization.

The reason seems to be the undefined order at which we query our peers, where each query is sent to only one peer at a time: https://github.com/lightninglabs/neutrino/blob/9a42f7df21be82a69f04caa83bce4034dca72764/query.go#L247

During the test in question, we are connected to 1 "good" and two "bad" peers. So if we are unlucky to not query the good peer at least once during the timeout, the test will fail.

We should be smarter about penalizing peers that are not answering our queries, to converge on the good peers.

halseth avatar Oct 29 '18 12:10 halseth