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.
This commit is contained in:
Antoine Poinsot 2023-08-10 13:04:40 +02:00
parent 5b6c2b5c43
commit 23a63f35e1
No known key found for this signature in database
GPG Key ID: E13FC145CD3F4304

View File

@ -646,7 +646,10 @@ impl BitcoinD {
}
let res = self.make_fallible_node_request(
"loadwallet",
&params!(Json::String(self.watchonly_wallet_path.clone()),),
&params!(
Json::String(self.watchonly_wallet_path.clone()),
Json::Bool(true), // load_on_startup
),
);
match res {
Err(BitcoindError::Server(jsonrpc::Error::Rpc(ref e))) => {