wallet: rm unused LegacyScriptPubKeyMan& spk_man #17338
pull jonatack wants to merge 1 commits into bitcoin:master from jonatack:rm-unused-spk-man-in-rpcdump changing 1 files +0 −10-
jonatack commented at 12:36 pm on November 1, 2019: memberFollow-up to #17300 “LegacyScriptPubKeyMan code cleanups” and #17300 (comment).
-
wallet: rm unused LegacyScriptPubKeyMan& spk_man
Follow-up to #17300 "LegacyScriptPubKeyMan code cleanups".
-
fanquake added the label Wallet on Nov 1, 2019
-
jonatack commented at 12:37 pm on November 1, 2019: memberNot sure if these should be removed or documented.
-
ryanofsky commented at 1:54 pm on November 1, 2019: member
This PR as of 074405ad1ded63d1ba83518f458fde61cfd220f5 isn’t really doing the right thing. The rpcdump methods are supposed to trigger “This type of wallet does not support this command” errors when called on descriptor wallets where
CWallet::GetLegacyScriptPubKeyMan
returns null (in the future after 4d0e6f063e34d3869f89d410ccdc4b6255a00150 from #17261).To clean this up I would rename the rpcdump function
GetLegacyScriptPubKeyMan
toEnsureLegacyScriptPubKeyMan
and keep calling it even when the returned reference is unused, just deleting the unused rpc_man variables, but not the function calls.Also, for more cleanup I would move
EnsureLegacyScriptPubKeyMan
torpcwallet.h
/rpcwallet.cpp
and start calling it from the other two rpc methods there that throw “This type of wallet does not support this command” errors. -
jonatack commented at 2:20 pm on November 1, 2019: memberThank you @ryanofsky for your feedback. Will do and look into PR #17261.
-
laanwj commented at 10:11 am on November 2, 2019: member
This PR as of 074405a isn’t really doing the right thing.
FWIW this is exactly what I warned about in #17300 (comment) :smile: But yes, might be better to just wait for @ryanofsky’s follow up on this.
-
jonatack commented at 10:20 am on November 2, 2019: memberHeh, I suspected as much. Closing rather than following up, then.
-
jonatack closed this on Nov 2, 2019
-
jonatack deleted the branch on Nov 2, 2019
-
ryanofsky added this to the "PRs" column in a project
-
ryanofsky removed this from the "PRs" column in a project
-
DrahtBot locked this on Dec 16, 2021
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 03:12 UTC
More mirrored repositories can be found on mirror.b10c.me