mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-30 09:40:16 +02:00
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
This commit is contained in:
commit
4cd6b3b557
@ -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…
x
Reference in New Issue
Block a user