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
  1. jonatack commented at 12:36 pm on November 1, 2019: member
    Follow-up to #17300 “LegacyScriptPubKeyMan code cleanups” and #17300 (comment).
  2. wallet: rm unused LegacyScriptPubKeyMan& spk_man
    Follow-up to #17300 "LegacyScriptPubKeyMan code cleanups".
    074405ad1d
  3. fanquake added the label Wallet on Nov 1, 2019
  4. jonatack commented at 12:37 pm on November 1, 2019: member
    Not sure if these should be removed or documented.
  5. 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 to EnsureLegacyScriptPubKeyMan 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 to rpcwallet.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.

  6. jonatack commented at 2:20 pm on November 1, 2019: member
    Thank you @ryanofsky for your feedback. Will do and look into PR #17261.
  7. 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.

  8. jonatack commented at 10:20 am on November 2, 2019: member
    Heh, I suspected as much. Closing rather than following up, then.
  9. jonatack closed this on Nov 2, 2019

  10. jonatack deleted the branch on Nov 2, 2019
  11. ryanofsky added this to the "PRs" column in a project

  12. ryanofsky removed this from the "PRs" column in a project

  13. DrahtBot locked this on Dec 16, 2021

github-metadata-mirror

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-07-06 01:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me