interbtc-clients
interbtc-clients copied to clipboard
Sync check not correct
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.