-
Notifications
You must be signed in to change notification settings - Fork 37.7k
LegacyScriptPubKeyMan code cleanups #17381
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
This also fixes unused variable warnings in rpcdump.cpp
Pass CTxDestination instead of more ambiguous uint160 hash value. This is more type safe and more efficient since it avoids doing map lookups that will always fail and were not done previously before a18edd7 from bitcoin#17304 Change suggested by Andrew Chow <achow101-github@achow101.com> in bitcoin#17304 (comment) and bitcoin#17381 (comment)
Suggested bitcoin#17304 (comment) by Gregory Sanders <gsanders87@gmail.com> Reason for keeping the `return true` `return false` verbosity is that more code will be added after the ReserveKeyFromKeyPool() call before returning.
b89bb40
to
5ed6daf
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.
5ed6daf
to
5b3a0b4
Compare
Updated 5ed6daf -> 5b3a0b4 ( |
I'm not sure that the Everything else looks good. |
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. |
5b3a0b4
to
fed8b28
Compare
Pass CTxDestination instead of more ambiguous uint160 hash value. This is more type safe and more efficient since it avoids doing map lookups that will always fail and were not done previously before a18edd7 from bitcoin#17304 Change suggested by Andrew Chow <achow101-github@achow101.com> in bitcoin#17304 (comment) and bitcoin#17381 (comment)
fed8b28
to
1f54dd2
Compare
Updated 5b3a0b4 -> 1f54dd2 ( |
Code review ACK 1f54dd2 |
AppVeyor failure (could be random, I restarted it):
|
Code review ACK 1f54dd2 |
Appveyor error is apparently unrelated and fixed by #17384 (comment) |
1f54dd2
to
05b224a
Compare
Updated 1f54dd2 -> 05b224a ( |
re-ACK 05b224a |
Code review ACK 05b224a |
05b224a Add missing SetupGeneration error handling in EncryptWallet (Russell Yanofsky) bfd826a Clean up nested scope in GetReservedDestination (Russell Yanofsky) 491a599 Get rid of confusing LegacyScriptPubKeyMan::TopUpKeyPool method (Russell Yanofsky) 4a0abf6 Pass CTxDestination to ScriptPubKeyMan::GetMetadata (Russell Yanofsky) b07b07c Add EnsureLegacyScriptPubKeyMan and use in rpcwallet.cpp (Russell Yanofsky) Pull request description: This PR implements suggested code cleanups from #17300 and #17304 review comments ACKs for top commit: Sjors: re-ACK 05b224a laanwj: Code review ACK 05b224a Tree-SHA512: 12fd86637088515b744c028e0501c5d21a9cf9ee9c9cfd70e9cb65d44611ea5643abd5f6f101105caa5aff015d74de606f074f08af7dae8429f929d21288ab45
05b224a Add missing SetupGeneration error handling in EncryptWallet (Russell Yanofsky) bfd826a Clean up nested scope in GetReservedDestination (Russell Yanofsky) 491a599 Get rid of confusing LegacyScriptPubKeyMan::TopUpKeyPool method (Russell Yanofsky) 4a0abf6 Pass CTxDestination to ScriptPubKeyMan::GetMetadata (Russell Yanofsky) b07b07c Add EnsureLegacyScriptPubKeyMan and use in rpcwallet.cpp (Russell Yanofsky) Pull request description: This PR implements suggested code cleanups from bitcoin#17300 and bitcoin#17304 review comments ACKs for top commit: Sjors: re-ACK 05b224a laanwj: Code review ACK 05b224a Tree-SHA512: 12fd86637088515b744c028e0501c5d21a9cf9ee9c9cfd70e9cb65d44611ea5643abd5f6f101105caa5aff015d74de606f074f08af7dae8429f929d21288ab45
Pass CTxDestination instead of more ambiguous uint160 hash value. This is more type safe and more efficient since it avoids doing map lookups that will always fail and were not done previously before a18edd7 from bitcoin#17304 Change suggested by Andrew Chow <achow101-github@achow101.com> in bitcoin#17304 (comment) and bitcoin#17381 (comment)
…llet.cpp Summary: This also fixes unused variable warnings in rpcdump.cpp --- bitcoin/bitcoin@b07b07c Partial backport of Core [[bitcoin/bitcoin#17381 | PR17381]] Test Plan: ninja check check-functional Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7416
Summary: Pass CTxDestination instead of more ambiguous uint160 hash value. This is more type safe and more efficient since it avoids doing map lookups that will always fail and were not done previously before bitcoin/bitcoin@a18edd7 Change suggested by Andrew Chow <achow101-github@achow101.com> in bitcoin/bitcoin#17304 (comment) and bitcoin/bitcoin#17381 (comment) --- bitcoin/bitcoin@4a0abf6 Depends on D7416 Partial backport of Core [[bitcoin/bitcoin#17381 | PR17381]] Test Plan: ninja check check-functional Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7417
…pKeyPool method Summary: Previous discussion bitcoin/bitcoin#17304 (comment) --- bitcoin/bitcoin@491a599 Depends on D7417 Partial backport of Core [[bitcoin/bitcoin#17381 | PR17381]] Test Plan: ninja check check-functional Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7418
Summary: Suggested bitcoin/bitcoin#17304 (comment) by Gregory Sanders <gsanders87@gmail.com> Reason for keeping the `return true` `return false` verbosity is that more code will be added after the ReserveKeyFromKeyPool() call before returning. --- bitcoin/bitcoin@bfd826a Depends on D7418 Partial backport of Core [[bitcoin/bitcoin#17381 | PR17381]] Test Plan: ninja check check-functional Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7419
…cryptWallet Summary: Suggested bitcoin/bitcoin#17304 (comment) by me --- bitcoin/bitcoin@05b224a Depends on D7419 Concludes backport of Core [[bitcoin/bitcoin#17381 | PR17381]] Test Plan: ninja check check-functional Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7420
05b224a Add missing SetupGeneration error handling in EncryptWallet (Russell Yanofsky) bfd826a Clean up nested scope in GetReservedDestination (Russell Yanofsky) 491a599 Get rid of confusing LegacyScriptPubKeyMan::TopUpKeyPool method (Russell Yanofsky) 4a0abf6 Pass CTxDestination to ScriptPubKeyMan::GetMetadata (Russell Yanofsky) b07b07c Add EnsureLegacyScriptPubKeyMan and use in rpcwallet.cpp (Russell Yanofsky) Pull request description: This PR implements suggested code cleanups from bitcoin#17300 and bitcoin#17304 review comments ACKs for top commit: Sjors: re-ACK 05b224a laanwj: Code review ACK 05b224a Tree-SHA512: 12fd86637088515b744c028e0501c5d21a9cf9ee9c9cfd70e9cb65d44611ea5643abd5f6f101105caa5aff015d74de606f074f08af7dae8429f929d21288ab45
This PR implements suggested code cleanups from #17300 and #17304 review comments