mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 03:03:22 -03:00
Merge bitcoin-core/gui#188: Write PSBTs to file with binary mode
cc3971c9ff
GUI: Write PSBTs to file with binary mode (Andrew Chow) Pull request description: As noted in https://github.com/bitcoin/bitcoin/issues/20959, PSBT files should be opened in binary mode as on windows, all newlines are turned into CRLF which produces invalid PSBTs. Fixes https://github.com/bitcoin/bitcoin/issues/20959 ACKs for top commit: Talkless: utACKcc3971c9ff
. Tree-SHA512: fee62b66da844017a44d7d6da6d2d2794b097a7dec33fb07711615df1e94dccc76f987ffcbb325ad1f8db2a2dd6eaf514b6cbd2453e7658b9f6c9fb5c4c41dab
This commit is contained in:
commit
b972913c33
2 changed files with 2 additions and 2 deletions
|
@ -145,7 +145,7 @@ void PSBTOperationsDialog::saveTransaction() {
|
|||
if (filename.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
std::ofstream out(filename.toLocal8Bit().data());
|
||||
std::ofstream out(filename.toLocal8Bit().data(), std::ofstream::out | std::ofstream::binary);
|
||||
out << ssTx.str();
|
||||
out.close();
|
||||
showStatus(tr("PSBT saved to disk."), StatusLevel::INFO);
|
||||
|
|
|
@ -434,7 +434,7 @@ void SendCoinsDialog::on_sendButton_clicked()
|
|||
if (filename.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
std::ofstream out(filename.toLocal8Bit().data());
|
||||
std::ofstream out(filename.toLocal8Bit().data(), std::ofstream::out | std::ofstream::binary);
|
||||
out << ssTx.str();
|
||||
out.close();
|
||||
Q_EMIT message(tr("PSBT saved"), "PSBT saved to disk", CClientUIInterface::MSG_INFORMATION);
|
||||
|
|
Loading…
Add table
Reference in a new issue