-
Notifications
You must be signed in to change notification settings - Fork 333
Write PSBTs to file with binary mode #188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Approach ACK. Is there a way to test this on non-windows? |
|
@Quantris Does this pr fix bitcoin/bitcoin#20959 for you? |
Talkless
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK cc3971c.
I DID test, but only on Linux (Debian Sid with Qt 5.15.2). I've created .psbt with PR version, imported into master version, and was able to sing and broadcast (regtest), so at least I don't see regressions in Linux.
Github-Pull: #bitcoin-core/gui#188 Rebased-From: cc3971c
|
Backported in bitcoin/bitcoin#20901 |
cc3971c GUI: Write PSBTs to file with binary mode (Andrew Chow) Pull request description: As noted in bitcoin#20959, PSBT files should be opened in binary mode as on windows, all newlines are turned into CRLF which produces invalid PSBTs. Fixes bitcoin#20959 ACKs for top commit: Talkless: utACK cc3971c. Tree-SHA512: fee62b66da844017a44d7d6da6d2d2794b097a7dec33fb07711615df1e94dccc76f987ffcbb325ad1f8db2a2dd6eaf514b6cbd2453e7658b9f6c9fb5c4c41dab
Sorry I missed replying to this at the time. I'm not really set up to build the project myself so I wouldn't have been able to test this without someone providing a binary. I can affirm that the issue seems fixed in 0.21.1 which includes this change; I tested in Win10 with the following steps in a watch-only wallet:
The same process in 0.21.0 fails in steps 3 & 4. I also looked around a bit for info on testing this kind of issue. Unfortunately I didn't find anything that makes text-mode vs. binary-mode distinguishable in linux (I was thinking maybe there would be some kind of env var or build flag for the stdlib). IOW seems like the only way to test this would be to run the tests in a Windows env. Thanks for the fix @achow101 ! |
Github-Pull: #bitcoin-core/gui#188 Rebased-From: cc3971c (cherry picked from commit 3a12672)
Github-Pull: #bitcoin-core/gui#188 Rebased-From: cc3971c (cherry picked from commit 3a12672)
Github-Pull: #bitcoin-core/gui#188 Rebased-From: cc3971c (cherry picked from commit 3a12672)
As noted in bitcoin/bitcoin#20959, PSBT files should be opened in binary mode as on windows, all newlines are turned into CRLF which produces invalid PSBTs.
Fixes bitcoin/bitcoin#20959