-
Notifications
You must be signed in to change notification settings - Fork 311
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
refactor(wallet)!: rename method to last_unused_address
#1680
base: master
Are you sure you want to change the base?
refactor(wallet)!: rename method to last_unused_address
#1680
Conversation
168fbbe
to
83f86cd
Compare
As per both out-of-band discussions, and the latest discussion at weekly development call, the semantics of this method can be misleading, as it's not guaranteed you get a next one on every call, that'd only happen if the address has been used and the application synced with latest blockchain state. Renaming it to `last_unused_address` gives it a better semantics, as you'll always get the last derived address which still unused. As per usage where the user needs always a new derived address on every call, you should still use the `reveal_next_address`, nothing changed.
83f86cd
to
07b85ca
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 07b85ca
New name looks good to me.
Okay thinking about it, this method actually returns the earliest unused... |
lets make this a doc only change |
As per last call discussion, I'll repurpose this PR to keep |
Will re-review after new direction changes pushed.
Description
As per both out-of-band discussions, and the latest discussion at weekly development call, the semantics of this method can be misleading, as it's not guaranteed you get a next one on every call, that'd only happen if the address has been used and the application synced with latest blockchain state.
Renaming it to
last_unused_address
gives it a better semantics, as you'll always get the last derived address which still unused. As per usage where the user needs always a new derived address on every call, you should still use thereveal_next_address
, nothing changed.Notes to the reviewers
I'm open for discussions/suggestions on naming alternatives and better semantics. I think
last_unused_address
is pretty good, but maybe you can come up with another better one.Changelog notice
Wallet::next_unused_address
method toWallet::last_unused_address
.Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingNew Features:
Bugfixes: