bitcoind: create watchonly wallet with load_on_startup = true

This commit is contained in:
Antoine Poinsot 2023-07-31 12:40:59 +02:00
parent adf9bf8dd8
commit 8ae597fec1
No known key found for this signature in database
GPG Key ID: E13FC145CD3F4304

View File

@ -512,13 +512,19 @@ impl BitcoinD {
}
fn create_wallet(&self, wallet_path: String) -> Result<(), String> {
// NOTE: we set load_on_startup to make sure the wallet will get updated before the
// historical blocks are deleted in case the bitcoind is pruned.
let res = self
.make_fallible_node_request(
"createwallet",
&params!(
Json::String(wallet_path),
Json::Bool(true), // watchonly
Json::Bool(true), // blank
Json::Bool(true), // watchonly
Json::Bool(true), // blank
Json::Null, // passphrase
Json::Bool(false), // avoid_reuse
Json::Bool(true), // descriptors
Json::Bool(true) // load_on_startup
),
)
.map_err(|e| e.to_string())?;