aboutsummaryrefslogtreecommitdiff
path: root/src/qt/psbtoperationsdialog.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-03-11 19:43:39 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-03-11 19:43:43 +0100
commitb972913c330a46811e26221490d3ee042529dfb9 (patch)
tree5a495593118e5ad98f6895493d0f5d26d70ec809 /src/qt/psbtoperationsdialog.cpp
parente9b6400a1ef2f1701040dec3fd72cd82bbf1879d (diff)
parentcc3971c9ff538a924c1a76ca1352bcaeb24f579f (diff)
Merge bitcoin-core/gui#188: Write PSBTs to file with binary mode
cc3971c9ff538a924c1a76ca1352bcaeb24f579f 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: utACK cc3971c9ff538a924c1a76ca1352bcaeb24f579f. Tree-SHA512: fee62b66da844017a44d7d6da6d2d2794b097a7dec33fb07711615df1e94dccc76f987ffcbb325ad1f8db2a2dd6eaf514b6cbd2453e7658b9f6c9fb5c4c41dab
Diffstat (limited to 'src/qt/psbtoperationsdialog.cpp')
-rw-r--r--src/qt/psbtoperationsdialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qt/psbtoperationsdialog.cpp b/src/qt/psbtoperationsdialog.cpp
index 55ab6046cf..d1f8d56100 100644
--- a/src/qt/psbtoperationsdialog.cpp
+++ b/src/qt/psbtoperationsdialog.cpp
@@ -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);