Skip to content

Commit 4e3b1a1

Browse files
committed
create descriptor based wallet by default
1 parent 3cac239 commit 4e3b1a1

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/lib.rs

+14-1
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,21 @@ impl BitcoinD {
193193
// to be compatible with different version, in the end we are only interested if
194194
// the call is succesfull not in the returned value.
195195
if client_base.call::<Value>("getblockchaininfo", &[]).is_ok() {
196+
let desc_wallet = if cfg!(not(any(
197+
feature = "0_20_1",
198+
feature = "0_20_0",
199+
feature = "0_19_1",
200+
feature = "0_19_0_1",
201+
feature = "0_18_1",
202+
feature = "0_18_0",
203+
feature = "0_17_1"
204+
))) {
205+
Some(true)
206+
} else {
207+
None
208+
};
196209
client_base
197-
.create_wallet("default", None, None, None, None, None)
210+
.create_wallet("default", None, None, None, None, desc_wallet)
198211
.unwrap();
199212
break Client::new(&node_url_default, Auth::CookieFile(cookie_file.clone()))
200213
.unwrap();

0 commit comments

Comments
 (0)