diff options
author | W. J. van der Laan <laanwj@protonmail.com> | 2021-11-10 18:16:50 +0100 |
---|---|---|
committer | W. J. van der Laan <laanwj@protonmail.com> | 2021-11-10 18:55:54 +0100 |
commit | e7feb73f07179653c0a768ce5d96abe983441936 (patch) | |
tree | 521e781bd619f0a1e331863134caf6cdea013113 /doc/fuzzing.md | |
parent | 4a8707741de2a8646d66b73d88b753fc9f4d9772 (diff) | |
parent | d150fe3ad5ce181511f2d2fd035a10530eaa4203 (diff) | |
download | bitcoin-e7feb73f07179653c0a768ce5d96abe983441936.tar.xz |
Merge bitcoin/bitcoin#22805: refactor: use CWallet const shared pointers in dump{privkey,wallet}
d150fe3ad5ce181511f2d2fd035a10530eaa4203 refactor: use `CWallet` const shared pointers in dump{privkey,wallet} RPCs (Sebastian Falbesoner)
ec2792d1dc3404d749a43556eeb4b63780ee6d94 refactor: use const `LegacyScriptPubKeyMan` references in dump{privkey,wallet} RPCs (Sebastian Falbesoner)
29905c092f15bbbc4d4964c2f99dcf12fefd4111 refactor: avoid multiple key->metadata lookups in dumpwallet RPC (Sebastian Falbesoner)
Pull request description:
~~This PR is based on #22787 ("refactor: actual immutable pointing"), which should be reviewed first.~~ (merged by now)
It aims to make the CWallet shared pointers actually immutable also for the `dumpprivkey` and `dumpwallet` RPC methods. For doing that, some more preparations are needed; we need a const-counterpart to the helper `EnsureLegacyScriptPubKeyMan` that accepts a const CWallet pointer and accordingly also returns a const `LegacyScriptPubKeyMan` instance. The metadata lookup in `dumpwallet` is changed to not need a mutable `ScriptPubKeyMan` instance by avoiding using the `operator[]` in its mapKeyMetadata map, which also avoids repeated lookups.
ACKs for top commit:
laanwj:
Code review ACK d150fe3ad5ce181511f2d2fd035a10530eaa4203
Tree-SHA512: 90ac05e21f40c6d0ebb479a71c545da2fd89940b9ca3409d9f932abc983bf8830d34c45086e68880d0d1e994846fbefee7534eec142ff4268e0fa28a1a411d36
Diffstat (limited to 'doc/fuzzing.md')
0 files changed, 0 insertions, 0 deletions