-
Notifications
You must be signed in to change notification settings - Fork 37.7k
refactor: Combine GetWalletForJSONRPCRequest and EnsureWalletIsAvailable functions #19100
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
Concept ACK removing all that copy-paste boilerplate |
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
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.
Code review ACK 5a431c3.
if (!EnsureWalletIsAvailable(wallet.get(), request.fHelp)) { | ||
return NullUniValue; | ||
} |
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.
Note: PR is just dropping the Ensure check here which has been around since 9508761. It seems like it never did anything because the wallet pointer would never be null, and it was probably added originally as a precaution
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.
Agree.
…ble functions This simplifies control flow and also helps get rid of the ::vpwallets variable, because EnsureWalletIsAvailable doesn't have access to the request context.
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.
Tested ACK f42f5e5.
if (!EnsureWalletIsAvailable(wallet.get(), request.fHelp)) { | ||
return NullUniValue; | ||
} |
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.
Agree.
ACK f42f5e5 (reviewed code to check that this is a refactor) 💢 Show signature and timestampSignature:
Timestamp of file with hash |
… EnsureWalletIsAvailable functions f42f5e5 refactor: Combine GetWalletForJSONRPCRequest and EnsureWalletIsAvailable functions (Russell Yanofsky) Pull request description: This simplifies control flow and also helps get rid of the ::vpwallets variable in bitcoin#19101 since EnsureWalletIsAvailable doesn't have access to the request context. ACKs for top commit: MarcoFalke: ACK f42f5e5 (reviewed code to check that this is a refactor) 💢 promag: Tested ACK f42f5e5. Tree-SHA512: eb10685de3db3c1d10c3a797d8da5c8c731e4a8c9024bbb7245929ba767a77a52783a739b8cb1fa7af6fcd233dcf9c8ebbe414eb8b902e2542601aac18625997
…ble functions Summary: This simplifies control flow and also helps get rid of the ::vpwallets variable, because EnsureWalletIsAvailable doesn't have access to the request context. This is a backport of [[bitcoin/bitcoin#19100 | core#19100]] Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Subscribers: deadalnix Differential Revision: https://reviews.bitcoinabc.org/D9452
Updated RPCs for Bitcoin PRs bitcoin#19100 and bitcoin#19250.
Updated RPCs for Bitcoin PRs bitcoin#19100 and bitcoin#19250.
This simplifies control flow and also helps get rid of the ::vpwallets variable in #19101 since EnsureWalletIsAvailable doesn't have access to the request context.