From 0662105e884dce3eae9d3eb0b0d49600c1260b90 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Sun, 18 Dec 2022 13:20:20 -0500 Subject: qt: Load PSBTs using istreambuf_iterator rather than istream_iterator istream_iterator eats whitespace charactesr which causes parsing failures for PSBTs that contain the bytes corresponding to those characters. Github-Pull: bitcoin-core/gui#687 Rebased-From: bb5ea1d9a954b7b9f443ee8fbbb04549cd0b08a7 --- src/qt/walletframe.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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{in}, {}); + data.assign(std::istreambuf_iterator{in}, {}); // Some psbt files may be base64 strings in the file rather than binary data std::string b64_str{data.begin(), data.end()}; -- cgit v1.2.3