rust-teos icon indicating copy to clipboard operation
rust-teos copied to clipboard

Reject to run if the backend is still doing IBD

Open sr-gi opened this issue 11 months ago • 1 comments

Fixes #223

sr-gi avatar Jul 27 '23 19:07 sr-gi

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.

mariocynicys avatar Aug 11 '23 05:08 mariocynicys