Skip to content

Commit 4cd6b3b

Browse files
author
MarcoFalke
committed
Merge #687: Load PSBTs using istreambuf_iterator rather than istream_iterator
bb5ea1d 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. bitcoin/bitcoin#25001 accidentally changed the original `istreambuf_iterator` to `istream_iterator`. ACKs for top commit: furszy: Tested ACK bb5ea1d MarcoFalke: review ACK bb5ea1d 🍇 Tree-SHA512: 35d90eee3efdcb6a360af69ac1727f9f2837ea621297196de3136299f5de6d9975df4e425e1fc5b8813c1ddb2a4d60c3969e1d5d968953a4628ca45e37d3bf05
2 parents 0139a0d + bb5ea1d commit 4cd6b3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qt/walletframe.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ void WalletFrame::gotoLoadPSBT(bool from_clipboard)
212212
return;
213213
}
214214
std::ifstream in{filename.toLocal8Bit().data(), std::ios::binary};
215-
data.assign(std::istream_iterator<unsigned char>{in}, {});
215+
data.assign(std::istreambuf_iterator<char>{in}, {});
216216

217217
// Some psbt files may be base64 strings in the file rather than binary data
218218
std::string b64_str{data.begin(), data.end()};

0 commit comments

Comments
 (0)