Repository navigation
fix(payjoin): print progress messages to stderr - #398
Open
chukwudiikeh wants to merge 2 commits into
Open
chukwudiikeh wants to merge 2 commits into
chukwudiikeh wants to merge 2 commits into
Conversation
receive_payjoin, send_payjoin and resume_payjoin printed progress messages to stdout alongside their JSON output, so the output could not be parsed as JSON. Print them to stderr instead, so they still show in the terminal and stdout carries only the JSON. Fixes bitcoindevkit#397
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #398 +/- ##
=======================================
Coverage 59.42% 59.42%
=======================================
Files 24 24
Lines 4498 4498
=======================================
Hits 2673 2673
Misses 1825 1825
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
@vadim-anfv @tvpeter please can you take a look at this.A follow-up from your comment on #396. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #397
receive_payjoin,send_payjoinandresume_payjoinreturn a JSON object, butPayjoinManageralso printed its progress messages (the Payjoin URI, polling status, resumed sessions, the fallback transaction) to stdout withprintln!. Piping these commands into a JSON parser got human-readable text followed by JSON, so parsing failed.This PR switches those 20
println!calls insrc/handlers/payjoin/mod.rstoeprintln!. The messages still show in the terminal, but stdout now carries only the JSON.Fixed
receive_payjoin,send_payjoinandresume_payjoinnow print progress messages to stderr, so their stdout is valid JSON.