Skip to content

Commit

Permalink
bitcoind: create watchonly wallet with load_on_startup = true
Browse files Browse the repository at this point in the history
  • Loading branch information
darosior committed Jul 31, 2023
1 parent adf9bf8 commit 8ae597f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/bitcoin/d/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())?;
Expand Down

0 comments on commit 8ae597f

Please sign in to comment.