From a7b84860793a2094b9cbfe13f380f852622ab2d5 Mon Sep 17 00:00:00 2001 From: edouardparis Date: Tue, 23 Jan 2024 17:19:20 +0100 Subject: [PATCH] fix panic for managed bitcoind on network change close #934 Co-authored-by: jp1ac4 <121959000+jp1ac4@users.noreply.github.com> --- gui/src/installer/step/bitcoind.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gui/src/installer/step/bitcoind.rs b/gui/src/installer/step/bitcoind.rs index 9f581a74..25b70b50 100644 --- a/gui/src/installer/step/bitcoind.rs +++ b/gui/src/installer/step/bitcoind.rs @@ -689,7 +689,10 @@ impl Step for InternalBitcoindStep { self.exe_download = Some(Download::new(0)); }; } - self.network = ctx.bitcoin_config.network; + if self.network != ctx.bitcoin_config.network { + self.internal_bitcoind_config = None; + self.network = ctx.bitcoin_config.network; + } if let Some(Ok(_)) = self.started { // This case can arise if a user switches from internal bitcoind to external and back to internal. if ctx.bitcoind_config.is_none() {