Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset bitcoind default settings on network change #932

Conversation

edouardparis
Copy link
Member

close #812

Copy link
Member Author

@edouardparis edouardparis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-ACK 8146269

@edouardparis edouardparis merged commit e671e50 into wizardsardine:master Jan 23, 2024
18 checks passed
@jp1ac4
Copy link
Collaborator

jp1ac4 commented Jan 23, 2024

ACK 8146269.

I've just realised we have a panic if the user does the same when using the managed bitcoind:

ERROR liana_gui:443: panic occurred at line 847 of file src/installer/step/bitcoind.rs: Some("Already added")

I believe we need to clear the internal bitcoind config:

diff --git a/gui/src/installer/step/bitcoind.rs b/gui/src/installer/step/bitcoind.rs
index 9f581a7..25b70b5 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() {

@edouardparis
Copy link
Member Author

👍 Creating a new issue for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GUi: setup: address & cookie path doesn't update when choosing other network
2 participants