Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
halseth opened this issue Oct 29, 2018 · 0 comments
Open

Comments

@halseth
Copy link
Contributor

halseth commented Oct 29, 2018

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:

peerGoroutine := func(sp *ServerPeer, quit <-chan struct{},

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant