Merge #634: fix gui loader: stop bitcoind if running after close request
eb10cdacd6ed42c7294f454da62381e3e91269dc fix loader: remove duplicate logs with bitcoind module (edouard) a50761afc010ea420cb3d679e15b3d29dde697ea fix gui loader: stop bitcoind if running after close request (edouard) Pull request description: close #631 ACKs for top commit: darosior: ACK eb10cdacd6ed42c7294f454da62381e3e91269dc Tree-SHA512: 3fcf5c81e377c7440c3dd1f442edcf6f6e3a61905f5fbdf78e42b9c2c6ce611460399e531e4ec7369ffc46c3c658f3215c072c265c6e49a77ab7cd15ef8c2f5c
This commit is contained in:
commit
1a4868bb89
@ -69,6 +69,7 @@ pub fn stop_internal_bitcoind(bitcoind_config: &BitcoindConfig) {
|
||||
Ok(bitcoind) => {
|
||||
info!("Stopping internal bitcoind...");
|
||||
bitcoind.stop();
|
||||
info!("Stopped liana managed bitcoind");
|
||||
}
|
||||
Err(e) => {
|
||||
warn!("Could not create interface to internal bitcoind: '{}'.", e);
|
||||
|
||||
@ -181,13 +181,19 @@ impl Loader {
|
||||
info!("Stopping internal daemon...");
|
||||
daemon.stop();
|
||||
info!("Internal daemon stopped");
|
||||
if self.gui_config.internal_bitcoind_exe_config.is_some() {
|
||||
if let Some(daemon_config) = daemon.config() {
|
||||
if let Some(bitcoind_config) = &daemon_config.bitcoind_config {
|
||||
stop_internal_bitcoind(bitcoind_config);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if self.gui_config.internal_bitcoind_exe_config.is_some() {
|
||||
if let Ok(daemon_config) =
|
||||
Config::from_file(self.gui_config.daemon_config_path.as_ref().cloned())
|
||||
{
|
||||
if let Some(bitcoind_config) = &daemon_config.bitcoind_config {
|
||||
stop_internal_bitcoind(bitcoind_config);
|
||||
} else {
|
||||
warn!("Liana daemon config does not have bitcoind config");
|
||||
}
|
||||
} else {
|
||||
warn!("Liana gui cannot access daemon config to stop bitcoind");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user