diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-07-25 14:32:40 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-07-25 15:04:25 +0200 |
commit | 9f23c1659938b4c85b4bc3914984a8bc51ab5090 (patch) | |
tree | a4411d1b0443daf3239132e0159d74ca955d4252 /src/script/sign.cpp | |
parent | 94dd89e6fa37d4d81c9e6787f965bc522242300d (diff) | |
parent | fad231ad41e12b7047deb64220942ca8cb8357bc (diff) |
Merge #13721: Bugfixes for BIP 174 combining and deserialization
fad231ad41e12b7047deb64220942ca8cb8357bc Fix merging of global unknown data in PSBTs (Andrew Chow)
41df035ee1694715ee1e0f89b08ac8c73987807b Check that PSBT keys are the correct length (Andrew Chow)
Pull request description:
This PR fixes a few bugs that were found and adds tests checking for these errors.
Specifically:
- Single byte keys are checked to actually be one byte.
- Unknown global data must be merged when combining two PSBTs.
Tree-SHA512: c0e7b4bc607d510cc005aaa7c0813ee58c5467ab7ce4adce485522dfeee92b1af3d29fe89df778b0ea812bb3827e085b30e04d4f4ebcefd8364d809573991332
Diffstat (limited to 'src/script/sign.cpp')
-rw-r--r-- | src/script/sign.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/script/sign.cpp b/src/script/sign.cpp index c2ae4ff2ea..d10b1c4fd7 100644 --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -474,6 +474,7 @@ void PartiallySignedTransaction::Merge(const PartiallySignedTransaction& psbt) for (unsigned int i = 0; i < outputs.size(); ++i) { outputs[i].Merge(psbt.outputs[i]); } + unknown.insert(psbt.unknown.begin(), psbt.unknown.end()); } bool PartiallySignedTransaction::IsSane() const |