Merge #1766: fix: skip syncing screen if node is not bitcoind

ba96bb6c063641debcbe2baf2c0f8e52e133f89a fix: skip syncing screen if node is not bitcoind (Michael Mallan)

Pull request description:

  Fixes #1256.

  The loading screen showing the blockchain sync progress will skipped if the node type is not Bitcoin Core.

ACKs for top commit:
  edouardparis:
    utACK ba96bb6c063641debcbe2baf2c0f8e52e133f89a

Tree-SHA512: 3a438e0e8d031ea416c8096742514769e446422dfe6523eaf19fa12d7551f0b1c86df37851e03a4794de5a152aee25d6a169714f35c1ea88e793042ac3e84a34
This commit is contained in:
edouardparis 2025-07-07 09:36:53 +02:00
commit 63068a6c39
No known key found for this signature in database
GPG Key ID: E65F7A089C20DC8F

View File

@ -34,7 +34,10 @@ use crate::{
wallet::{Wallet, WalletError},
},
daemon::{client, embedded::EmbeddedDaemon, model::*, Daemon, DaemonError},
node::bitcoind::{internal_bitcoind_debug_log_path, Bitcoind, StartInternalBitcoindError},
node::{
bitcoind::{internal_bitcoind_debug_log_path, Bitcoind, StartInternalBitcoindError},
NodeType,
},
};
const SYNCING_PROGRESS_1: &str = "Bitcoin Core is synchronising the blockchain. A full synchronisation typically takes a few days and is resource-intensive. Once the initial synchronisation is done, the next ones will be much faster.";
@ -156,9 +159,9 @@ impl Loader {
daemon: Arc<dyn Daemon + Sync + Send>,
info: GetInfoResult,
) -> Task<Message> {
// If the wallet was previously synced (blockheight > 0), load the
// application directly.
if info.block_height > 0 {
// If the node is not Bitcoin Core or otherwise the wallet was previously synced (blockheight > 0),
// load the application directly.
if daemon.backend().node_type() != Some(NodeType::Bitcoind) || info.block_height > 0 {
return Task::perform(
load_application(
self.wallet_settings.clone(),