wallet: erase spkmans rather than setting to nullptr #22379

pull achow101 wants to merge 1 commits into bitcoin:master from achow101:fix-spkman-del changing 1 files +2 −2
  1. achow101 commented at 5:24 AM on July 1, 2021: member

    In many places in ScriptPubKeyMan managing code, we assume that the ScriptPubKeyMan being retrieved actually exists and is not a nullptr. Thus removing a ScriptPubKeyMan requires erasing the object from the map rather than setting it to a nullptr.

    This fixes a segmentation fault that can be reached with test/functional/wallet_descriptors.py --descriptors

  2. wallet: erase spkmans rather than setting to nullptr
    In many places in ScriptPubKeyMan managing code, we assume that the
    ScriptPubKeyMan being retrieved actually exists and is not a nullptr.
    Thus removing a ScriptPubKeyMan requires erasing the object from the
    map rather than setting it to a nullptr.
    b945a31afa
  3. achow101 cross-referenced this on Jul 1, 2021 from issue wallet, refactor: make DescriptorScriptPubKeyMan agnostic of internal flag by S3RK
  4. fanquake requested review from instagibbs on Jul 1, 2021
  5. fanquake requested review from meshcollider on Jul 1, 2021
  6. fanquake commented at 5:32 AM on July 1, 2021: member

    cc @S3RK

  7. fanquake added the label Wallet on Jul 1, 2021
  8. S3RK commented at 9:01 AM on July 1, 2021: contributor

    ACK b945a31 Verified that's the only nullptr assignments from #19651 and #20191 Compiled and ran ./test/functional/wallet_descriptor.py --descriptors locally

    I totally missed that, thanks @achow101 for fixing that!

  9. fanquake merged this on Jul 1, 2021
  10. fanquake closed this on Jul 1, 2021

  11. sidhujag referenced this in commit 28d76d2eb3 on Jul 1, 2021
  12. gwillen referenced this in commit 9863e0bbb5 on Jun 1, 2022
  13. bitcoin locked this on Aug 16, 2022

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: 2026-05-19 06:53 UTC