Merge #807: gui: display headers sync progress too in loader

88d00ae1a3c99b32a5bd0aa457b16bb1a8ad064f gui: display headers sync progress too in loader (Antoine Poinsot)

Pull request description:

  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.

  Fixes #780.

ACKs for top commit:
  jp1ac4:
    ACK 88d00ae1a3.

Tree-SHA512: 7ec75c7eea18bba23691fe20e2e4a4680c724e50b77d834da5384c1f1fcbc1e1100d6bb8aacd4ec01e7dbd5051a489376c97168d214054465d7ae3a7ae1fc120
This commit is contained in:
Antoine Poinsot 2023-11-10 13:24:50 +01:00
commit 8548c62618
No known key found for this signature in database
GPG Key ID: E13FC145CD3F4304

View File

@ -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),