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.
This commit is contained in:
jp1ac4 2023-11-01 15:33:13 +00:00
parent cf9404558f
commit bdd16c73bc
No known key found for this signature in database
GPG Key ID: A7ACD32423568D7B

View File

@ -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);
}