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

Reject to run if the backend is still doing IBD #234

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sr-gi
Copy link
Member

@sr-gi sr-gi commented Jul 27, 2023

Fixes #223

@mariocynicys
Copy link
Collaborator

This should detect if we are in IBD while bootstrapping. That's fine.
It doesn't address the issue in #223 though. In #223, it's after bootstrapping is complete and we are in a steady state, bitcoind responds to us slowly but move up the chain quickly (because it was out-of-sync) and prunes blocks we didn't yet receive.

It's not like we can eliminate this case by somehow making bitcoind respond to our RPC quickly, but we can detect the case (we get out-of-sync with bitcoind, i.e. the next block we want is no long with bitcoind) when it finally happens by checking if blocks are actually connected from the output of SpvClient::poll_best_tip.

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

Successfully merging this pull request may close these issues.

SpvClient loses the connection chain and stops providing blocks
2 participants