From 23a63f35e1344a0e6c247e564311cac3e965693c Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Thu, 10 Aug 2023 13:04:40 +0200 Subject: [PATCH] bitcoind: override watchonly wallet as to be loaded on startup we used to not set 'load_on_startup' when creating a watchonly wallet. This could create some complications when people are using agressive pruning configurations. Fix this by overwriting this parameter when loading watchonly wallets. We can always revert this in the future if for some reason a user wants to have it set to false and no be overwritten everytime Liana loads it. --- src/bitcoin/d/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bitcoin/d/mod.rs b/src/bitcoin/d/mod.rs index 73e959dd..bc4a89be 100644 --- a/src/bitcoin/d/mod.rs +++ b/src/bitcoin/d/mod.rs @@ -646,7 +646,10 @@ impl BitcoinD { } let res = self.make_fallible_node_request( "loadwallet", - ¶ms!(Json::String(self.watchonly_wallet_path.clone()),), + ¶ms!( + Json::String(self.watchonly_wallet_path.clone()), + Json::Bool(true), // load_on_startup + ), ); match res { Err(BitcoindError::Server(jsonrpc::Error::Rpc(ref e))) => {