From bdd16c73bcae64e17931bd62d70f4d85b9a6af9a Mon Sep 17 00:00:00 2001 From: jp1ac4 <121959000+jp1ac4@users.noreply.github.com> Date: Wed, 1 Nov 2023 15:33:13 +0000 Subject: [PATCH] installer: start new bitcoind download if not finished In case user clicks on Previous before bitcoind download has finished, this will clear the incomplete download from `InternalBitcoindStep` so that a new download will start if the user returns to this step. --- gui/src/installer/step/bitcoind.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gui/src/installer/step/bitcoind.rs b/gui/src/installer/step/bitcoind.rs index 655212a2..544cb415 100644 --- a/gui/src/installer/step/bitcoind.rs +++ b/gui/src/installer/step/bitcoind.rs @@ -658,6 +658,13 @@ impl Step for InternalBitcoindStep { bitcoind.stop(); } self.internal_bitcoind = None; + if let Some(download) = self.exe_download.as_ref() { + // Clear exe_download if not Finished. + if let DownloadState::Finished { .. } = download.state { + } else { + self.exe_download = None; + } + } self.started = None; // clear both Ok and Err return Command::perform(async {}, |_| Message::Previous); }