interbtc-clients icon indicating copy to clipboard operation
interbtc-clients copied to clipboard

Sync check not correct

Open sander2 opened this issue 3 years ago • 0 comments

We currently check if the bitcoin chain has been synced like this: https://github.com/interlay/interbtc-clients/blob/e6ee91dbaf1d390fec205cd63e122dc87785b50f/bitcoin/src/lib.rs#L394

However, neither initial_block_download nor verification_progress can be relied upon, see https://github.com/bitcoin/bitcoin/issues/26432 and https://github.com/bitcoin/bitcoin/issues/26433

According to stackexchange we should compare the blocks and headers fields - if they are equal then the bitcoin node is synced.

sander2 avatar Nov 02 '22 12:11 sander2