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. fanquake requested review from instagibbs on Jul 1, 2021
  4. fanquake requested review from meshcollider on Jul 1, 2021
  5. fanquake commented at 5:32 am on July 1, 2021: member
    cc @S3RK
  6. fanquake added the label Wallet on Jul 1, 2021
  7. S3RK commented at 9:01 am on July 1, 2021: member

    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!

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

  10. sidhujag referenced this in commit 28d76d2eb3 on Jul 1, 2021
  11. gwillen referenced this in commit 9863e0bbb5 on Jun 1, 2022
  12. DrahtBot 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: 2024-12-18 15:12 UTC

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