Skip to content

Create descriptor-based wallet by default if above bitcoin v21.0+ #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

sandipndev
Copy link

When we launch the bitcoind process, the default wallet being created enables descriptor mode.

@sandipndev
Copy link
Author

Waiting for PR RCasatta/rust-bitcoincore-rpc#1 to be merged for this to go through.

@sandipndev sandipndev force-pushed the create-wallet-updates branch from 83697fc to 887d41b Compare September 23, 2021 05:10
@sandipndev sandipndev marked this pull request as ready for review September 23, 2021 05:11
@RCasatta
Copy link
Collaborator

Based on the results from the CI, I think we may need to have Some(true) only on bitcoind >=0.21

something like:

let desc_wallet = if cfg!(any(feature = "22_0", feature = "0_21_1",  feature = "0_21_0")) {
   Some(true)
}
else {
   None
}

@notmandatory
Copy link
Contributor

Based on the results from the CI, I think we may need to have Some(true) only on bitcoind >=0.21

Agreed, but maybe invert the logic to check if cfg!(not(any(feature = "0_20_1" .... etc., it's a bit longer but then we won't need to update this line every time a new version of core is added.

@sandipndev sandipndev force-pushed the create-wallet-updates branch from 887d41b to 4e3b1a1 Compare September 23, 2021 16:00
@sandipndev sandipndev changed the title Create Descriptor based wallet by default Create descriptor-based wallet by default if above bitcoin v21.0+ Sep 24, 2021
@RCasatta
Copy link
Collaborator

CI is reliably failing for: 0_20_1, 0_20_0, 0_19_1, 0_19_0. I think because the number of arguments of create_wallet changed (and I think master is working because None is accepted)

We may want to feature gate the call to create_wallet according to the version, but I am not sure even considering that now that https://github.com/rust-bitcoin/rust-bitcoincore-rpc finally shipped with rust-bitcoin: 0.27 I would like to go back to use that dep instead of our custom one.

@sandipndev instead of needing this in your code could you create a new wallet with descriptor_wallet true instead of changing the default?

@sandipndev sandipndev closed this Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants