Skip to content

Conversation

ryanofsky
Copy link
Contributor

@ryanofsky ryanofsky commented May 28, 2020

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.

@maflcko
Copy link
Member

maflcko commented May 28, 2020

Concept ACK removing all that copy-paste boilerplate

@DrahtBot
Copy link
Contributor

DrahtBot commented May 29, 2020

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, 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.

Copy link
Contributor

@promag promag left a 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.

Comment on lines -2553 to -2565
if (!EnsureWalletIsAvailable(wallet.get(), request.fHelp)) {
return NullUniValue;
}
Copy link
Contributor Author

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

Copy link
Contributor

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.
@ryanofsky
Copy link
Contributor Author

Rebased 5a431c3 -> f42f5e5 (pr/ensa.1 -> pr/ensa.2, compare) due to conflict with #19096

Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested ACK f42f5e5.

Comment on lines -2553 to -2565
if (!EnsureWalletIsAvailable(wallet.get(), request.fHelp)) {
return NullUniValue;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree.

@maflcko
Copy link
Member

maflcko commented Jun 11, 2020

ACK f42f5e5 (reviewed code to check that this is a refactor) 💢

Show signature and timestamp

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

ACK f42f5e58f5fd063d5feec3eadf4a4040a941d4af (reviewed code to check that this is a refactor) 💢
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUi8SQv/Q7tX1S0X8I7F/3+3cNWQdZwQ0wytqNJQy5fBL9hxrjUO19DK35ngFdvl
Y6yn5FJWhW1uy2f5Au2471EiD6Jo29vSNabx6ctIzFp2SAzoOUUVPYfrxKVpz8cU
SIuG+NxjD6fYBq7PYL5V3P1qQWD25FLm1KrVz01Y3ePUd0P9mYYIKz0SvUG1MfLI
6ZrI+ou/k4JqKdXVpL5n7mAJkAh9HpXmqE4VP3EuVrZRp56t2MePvwc+iZY44bL5
vCdYQRuB+H9my1R3/xcG6fZaFBrNPo4BM8T8PniR3sSCbR24WL8JbxoBh4EhbRRz
iRdDFDGLdtOm9a/hkGT2uLCA83R6j1QzZmLyON3CnY//TmwCDgasr3Ds7tt2pR5t
de1NtCLLvS3/bZNz5c9JtniSQctCYsu75b5JU4rwuodFDRGmoN2mlKNJglhXQfGZ
ZVAlQ4udZa1DSDA4ivMh+X8oIx1hiTQys/duGhjw3Vrfb9lCtsnEEpyN/FWcEFV6
VJhE7CAU
=xs4O
-----END PGP SIGNATURE-----

Timestamp of file with hash 91abc4cab5ad750fa39568a9cdd77f33c2cfdb2f05ec0fcf18b5c862634b598f -

@maflcko maflcko merged commit 7a24cca into bitcoin:master Jun 11, 2020
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jun 11, 2020
… 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
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Apr 29, 2021
…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
cryptapus pushed a commit to cryptapus/bitcoin that referenced this pull request May 3, 2021
cryptapus pushed a commit to cryptapus/bitcoin that referenced this pull request May 3, 2021
Updated RPCs for Bitcoin PRs bitcoin#19100 and bitcoin#19250.
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants