[0.17] Backport #14424 (Stop requiring imported pubkey to sign non-PKH schemes) #14889

pull meshcollider wants to merge 1 commits into bitcoin:0.17 from meshcollider:201812_backport_14424 changing 1 files +7 −7
  1. meshcollider commented at 7:14 pm on December 6, 2018: contributor
    Github-Pull: #14424 Rebased-From: 2f6b466aeb6d4c88ab2e0e8b2a402be0743608b5
  2. meshcollider added the label Wallet on Dec 6, 2018
  3. meshcollider added the label Backport on Dec 6, 2018
  4. meshcollider added this to the milestone 0.17.2 on Dec 6, 2018
  5. meshcollider removed this from the milestone 0.17.2 on Dec 6, 2018
  6. meshcollider added this to the milestone 0.17.1 on Dec 6, 2018
  7. meshcollider requested review from sipa on Dec 6, 2018
  8. laanwj commented at 8:31 pm on December 6, 2018: member

    looks like your rebased-from header is not correct (should be 2f6b466aeb6d4c88ab2e0e8b2a402be0743608b5 instead of 2f6b466aeb6d4c88ab2e0e8b2a402be0743608b4)

    Apart from that, utACK

    Difference from cherry-picked commit is:

     0diff --git a/src/script/sign.cpp b/src/script/sign.cpp
     1index a95a8609b3cf8f51e48c81199a764a480dc34c73..86b42d874f4f68f837c277df3358a00cdd60e1c2 100644
     2--- a/src/script/sign.cpp
     3+++ b/src/script/sign.cpp
     4@@ -77,7 +77,10 @@ static bool CreateSig(const BaseSignatureCreator& creator, SignatureData& sigdat
     5         sig_out = it->second.second;
     6         return true;
     7     }
     8-    sigdata.misc_pubkeys.emplace(keyid, pubkey);
     9+    KeyOriginInfo info;
    10+    if (provider.GetKeyOrigin(keyid, info)) {
    11+        sigdata.misc_pubkeys.emplace(keyid, std::make_pair(pubkey, std::move(info)));
    12+    }
    13     if (creator.CreateSig(provider, sig_out, keyid, scriptcode, sigversion)) {
    14         auto i = sigdata.signatures.emplace(keyid, SigPair(pubkey, sig_out));
    15         assert(i.second);
    

    This makes sense, as the key origin code is different from master to 0.17.

  9. Stop requiring imported pubkey to sign non-PKH schemes
    Github-Pull: #14424
    Rebased-From: 2f6b466aeb6d4c88ab2e0e8b2a402be0743608b5
    89a9a9d938
  10. meshcollider commented at 9:32 pm on December 6, 2018: contributor
    Fixed the commit message, thanks @laanwj
  11. laanwj merged this on Dec 6, 2018
  12. laanwj closed this on Dec 6, 2018

  13. laanwj referenced this in commit c6e4a1fca5 on Dec 6, 2018
  14. gmaxwell commented at 11:12 pm on December 6, 2018: contributor
    ACK (looks like it works to me)
  15. meshcollider deleted the branch on Sep 5, 2019
  16. DrahtBot locked this on Dec 16, 2021


meshcollider laanwj gmaxwell


sipa

Labels
Wallet Backport

Milestone
0.17.1


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-23 09:12 UTC

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