-
Notifications
You must be signed in to change notification settings - Fork 31
Implement encryptwallet method and test #250
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
Conversation
f473e1e
to
e9bf939
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK e9bf939
Nice, you're on a roll. |
Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good. If you don't want to do the auth thing just throw a comment in the code, something like // TODO: This match shoud really be handled by the crate not in each individual test like this
.
Cheers
integration_test/tests/wallet.rs
Outdated
let client = match () { | ||
#[cfg(feature = "v20_and_below")] | ||
() => node.create_wallet(wallet_name).expect("createwallet"), | ||
#[cfg(not(feature = "v20_and_below"))] | ||
() => { | ||
node.client.create_wallet(wallet_name).expect("createwallet"); | ||
&node.client | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you feeling adventurous? It would be nice to investigate why this is needed and move the feature gating logic to node/src/lib.rs
in the create_wallet
function so that every test author does not have to think about it. FTR I did not investigate, I vaguely remember hitting this before though so my suggestion is just a hunch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. I am even thinking that we can just use the create_wallet
function from node, since it returns a client, then we can just call the encrypt_wallet
on that client directly, I think it should work with all the versions, so we need not feature gate the test any more.
The create_wallet
from node
works for v17-v20 that needs the full wallet uri and for v21 upwards which also accepts either just the wallet name or the full wallet uri.
078e1f7
to
7e50e41
Compare
29a4a50
to
e513cbe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK e513cbe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK e513cbe
The JSON-RPC method
encryptwallet
does return a type. We want to test this to catch any changes in behavior in future Core versions.This PR adds a client function that errors if the return value is anything other than the type it returns, along with an integration test that calls this function.
Ref: #116