Fix: importmulti only imports origin info for PKH outputs #15749

pull sipa wants to merge 3 commits into bitcoin:master from sipa:201904_importallorigins changing 6 files +21 −12
  1. sipa commented at 7:57 PM on April 4, 2019: member

    This fixes #15743 and #15742.

    Since #15263, pubkeys are no longer imported for non-PKH (or WPKH, or any wrapped form of those) outputs, as that would incorrectly mark outputs to single-key versions of multisig policies as watched.

    As a side effect, this change also caused origin info not to be imported anymore for multisig policies.

    Fix this by plumbing through the full pubkey information for origins in FlatSigningProvider, and then importing all origin info we have in importmulti (knowing more never hurts, and additional origin information has no negative consequences like importing the pubkeys themselves).

  2. Keep full pubkeys in FlatSigningProvider::origins 9a93c91c88
  3. Import all origin info in importmulti; even for non-importing pubkeys 6e597001a4
  4. DrahtBot added the label RPC/REST/ZMQ on Apr 4, 2019
  5. DrahtBot added the label Tests on Apr 4, 2019
  6. DrahtBot added the label Wallet on Apr 4, 2019
  7. sipa commented at 8:02 PM on April 4, 2019: member
  8. DrahtBot commented at 8:09 PM on April 4, 2019: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #15764 (Native descriptor wallets by achow101)
    • #15741 (Batch write imported stuff in importmulti by achow101)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  9. gwillen commented at 9:02 PM on April 4, 2019: contributor

    utACK, thanks for the quick fix!

  10. achow101 commented at 10:22 PM on April 4, 2019: member

    utACK 6e597001a4fc1ba837f3f23cfd7f2d65c3d58104

  11. sipa commented at 3:26 PM on April 6, 2019: member

    Added an extra commit to address #15742. Can you test, @gwillen?

  12. Take non-importing keys into account for spendability warning in descriptor import b5d3987724
  13. sipa force-pushed on Apr 6, 2019
  14. gwillen commented at 9:56 PM on April 8, 2019: contributor

    @sipa tACK! Confirmed this fixes both problems. Thanks again!

  15. sipa added the label Bug on Apr 9, 2019
  16. sipa commented at 1:54 AM on April 9, 2019: member

    I'm marking this as a bug, as the current importmulti output is sometimes just wrong (it may tell you your import is spendable while it isn't). I don't think it's serious enough to warrant an 0.18.0rc4, but if there is one, maybe we want it included.

  17. meshcollider merged this on Apr 9, 2019
  18. meshcollider closed this on Apr 9, 2019

  19. meshcollider referenced this in commit 54798c3a31 on Apr 9, 2019
  20. laanwj added this to the milestone 0.18.0 on Apr 11, 2019
  21. laanwj added the label Needs backport on Apr 11, 2019
  22. MarcoFalke referenced this in commit e57462c6ba on Apr 16, 2019
  23. fanquake removed the label Needs backport on Apr 16, 2019
  24. fanquake commented at 11:56 AM on April 16, 2019: member

    Backported in #15803.

  25. HashUnlimited referenced this in commit 51bef31c1c on Apr 19, 2019
  26. HashUnlimited referenced this in commit 01550afa4f on Apr 19, 2019
  27. HashUnlimited referenced this in commit 6e5ddb5ef3 on Apr 19, 2019
  28. deadalnix referenced this in commit a62f3e2135 on Jun 5, 2020
  29. kittywhiskers referenced this in commit f7a7b4772a on Oct 28, 2021
  30. kittywhiskers referenced this in commit 84097e861d on Oct 29, 2021
  31. pravblockc referenced this in commit d9957269ca on Nov 18, 2021
  32. 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: 2026-04-13 15:14 UTC

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