diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2022-12-21 09:47:28 +0100 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2022-12-21 09:47:56 +0100 |
commit | 4cd6b3b557243cd1a93cd44cd477c785f91580c0 (patch) | |
tree | eaaf408e8a409694535542df9966b7b5a05a8a32 /src/qt | |
parent | 0139a0d5c02a8099a774aa7f94019bc816f01221 (diff) | |
parent | bb5ea1d9a954b7b9f443ee8fbbb04549cd0b08a7 (diff) |
Merge bitcoin-core/gui#687: Load PSBTs using istreambuf_iterator rather than istream_iterator
bb5ea1d9a954b7b9f443ee8fbbb04549cd0b08a7 qt: Load PSBTs using istreambuf_iterator rather than istream_iterator (Andrew Chow)
Pull request description:
`istream_iterator` eats whitespace charactesr which causes parsing failures for PSBTs that contain the bytes corresponding to those characters. `istreambuf_iterator` is the correct thing to use here.
This is a regression in 24.0. https://github.com/bitcoin/bitcoin/pull/25001 accidentally changed the original `istreambuf_iterator` to `istream_iterator`.
ACKs for top commit:
furszy:
Tested ACK bb5ea1d9
MarcoFalke:
review ACK bb5ea1d9a954b7b9f443ee8fbbb04549cd0b08a7 🍇
Tree-SHA512: 35d90eee3efdcb6a360af69ac1727f9f2837ea621297196de3136299f5de6d9975df4e425e1fc5b8813c1ddb2a4d60c3969e1d5d968953a4628ca45e37d3bf05
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/walletframe.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp index 8dc97e66a2..adc7793916 100644 --- a/src/qt/walletframe.cpp +++ b/src/qt/walletframe.cpp @@ -212,7 +212,7 @@ void WalletFrame::gotoLoadPSBT(bool from_clipboard) return; } std::ifstream in{filename.toLocal8Bit().data(), std::ios::binary}; - data.assign(std::istream_iterator<unsigned char>{in}, {}); + data.assign(std::istreambuf_iterator<char>{in}, {}); // Some psbt files may be base64 strings in the file rather than binary data std::string b64_str{data.begin(), data.end()}; |