mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
Merge bitcoin-core/gui#687: Load PSBTs using istreambuf_iterator rather than istream_iterator
bb5ea1d9a9
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 ACKbb5ea1d9
MarcoFalke: review ACKbb5ea1d9a9
🍇 Tree-SHA512: 35d90eee3efdcb6a360af69ac1727f9f2837ea621297196de3136299f5de6d9975df4e425e1fc5b8813c1ddb2a4d60c3969e1d5d968953a4628ca45e37d3bf05
This commit is contained in:
commit
4cd6b3b557
1 changed files with 1 additions and 1 deletions
|
@ -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()};
|
||||
|
|
Loading…
Reference in a new issue