-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Return address and type of imported key in z_importkey #4220
Conversation
I made this code last week without noticing the issue already had a PR. Please feel free to close it in favour of #3754 |
I ported the visitor from #3754 with some small modifications to address #3754 (comment) My apologies @dagurval for taking over your code. I think now this one haves the best of the 2 so #3754 can be closed if you agree. |
☔ The latest upstream changes (presumably #4270) made this pull request unmergeable. Please resolve the merge conflicts. |
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.
Generally LGTM.
Please address the comments below, rebase this on master (cleaning up the history as appropriate), and add a Co-authored-by: Dagur Valberg Johannsson <dagurval@pvv.ntnu.no>
line to the commit messages for each commit that pulls in work from #3754.
qa/rpc-tests/wallet_sapling.py
Outdated
@@ -136,11 +136,13 @@ def run_test(self): | |||
|
|||
# Verify importing a spending key will update the nullifiers and witnesses correctly | |||
sk0 = self.nodes[0].z_exportkey(saplingAddr0) | |||
self.nodes[2].z_importkey(sk0, "yes") | |||
assert_equal(self.nodes[2].z_getbalance(saplingAddr0), Decimal('10')) | |||
saplingAddr0 = self.nodes[2].z_importkey(sk0, "yes") |
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.
This shadows the original saplingAddr0
, functionally altering it from an address to a tuple containing an address, which is likely to confuse future people modifying this test. Use a different name for the returned tuple.
qa/rpc-tests/wallet_sapling.py
Outdated
sk1 = self.nodes[1].z_exportkey(saplingAddr1) | ||
self.nodes[2].z_importkey(sk1, "yes") | ||
assert_equal(self.nodes[2].z_getbalance(saplingAddr1), Decimal('5')) | ||
saplingAddr1 = self.nodes[2].z_importkey(sk1, "yes") |
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.
Ditto.
dd1978d
to
6ada1ae
Compare
Co-authored-by: Dagur Valberg Johannsson <dagurval@pvv.ntnu.no>
6ada1ae
to
76a43b6
Compare
Fixed comments, rebased and squashed everything in just 1 commit co authored. |
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.
utACK
@zkbot r+ |
📌 Commit 76a43b6 has been approved by |
Return address and type of imported key in z_importkey Fixes #3748.
Fixes #3748.