From 88d00ae1a3c99b32a5bd0aa457b16bb1a8ad064f Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Fri, 10 Nov 2023 12:52:39 +0100 Subject: [PATCH] gui: display headers sync progress too in loader Maybe we should just get rid of the filtering since there is no stability guarantees wrt logging. On the other hand we'd probably need to increase the update frequency if we do that. In the meantime at least display also the blockheaders so the sync doesn't appear to be stuck for 5 minutes at startup. --- gui/src/loader.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gui/src/loader.rs b/gui/src/loader.rs index 3c34564b..6898be6c 100644 --- a/gui/src/loader.rs +++ b/gui/src/loader.rs @@ -322,7 +322,11 @@ impl Loader { let last_update_tip = reader .lines() .into_iter() - .filter(|l| l.as_ref().map(|l| l.contains("UpdateTip")).unwrap_or(false)) + .filter(|l| { + l.as_ref() + .map(|l| l.contains("UpdateTip") || l.contains("blockheaders")) + .unwrap_or(false) + }) .last(); match last_update_tip { Some(Ok(line)) => (Message::BitcoindLog(Some(line)), log_path),