Remove explicit print in lightning-net-tokio, reduce redundant block connection logging#1048
Merged
TheBlueMatt merged 4 commits intolightningdevkit:mainfrom Aug 18, 2021
Merged
Conversation
jkczyz
reviewed
Aug 17, 2021
cf84655 to
0fa452e
Compare
Codecov Report
@@ Coverage Diff @@
## main #1048 +/- ##
==========================================
+ Coverage 90.96% 92.26% +1.30%
==========================================
Files 64 65 +1
Lines 32447 38813 +6366
==========================================
+ Hits 29515 35812 +6297
- Misses 2932 3001 +69
Continue to review full report at Codecov.
|
jkczyz
approved these changes
Aug 17, 2021
Collaborator
Author
|
Addressed feedback and added one more commit to clean up docs. |
jkczyz
approved these changes
Aug 17, 2021
valentinewallace
approved these changes
Aug 17, 2021
lightning/src/chain/chainmonitor.rs
Outdated
| } | ||
|
|
||
| fn transaction_unconfirmed(&self, txid: &Txid) { | ||
| log_debug!(self.logger, "{} reorganized out of chain", txid); |
Contributor
There was a problem hiding this comment.
suggestion: s/{}/txid {}
Collaborator
Author
There was a problem hiding this comment.
How about Transaction {}?
It isn't exactly a critical error situation when we disconnect a socket, so we shouldn't be printing to stderr, entirely bypassing user logging, when it happens. We do still print to stderr if we fail to write the first message to the socket, but this should never happen unless the user has a reasonably-configured system with at least one packet in bytes available for the socket buffer.
For users with many ChannelMonitors, we log a large volume per block simply because each ChannelMonitor lots several times per block. Instead, we move to log only once at the TRACE level per block call in ChannelMonitors, relying instead on a DEBUG level log in ChainMonitor before we call any ChannelMonitor functions. For most users, this will reduce redundant logging and also log at the DEBUG level for block events, which is appropriate. Fixes lightningdevkit#980.
77178c6 to
5d84704
Compare
Collaborator
Author
|
Pushed a trivial change as suggested by val and squashed, diff from Jeff's ACK: |
valentinewallace
approved these changes
Aug 17, 2021
This is especially important for C or other language bindings clients as the `version` field may be exported as a `u8`.
5d84704 to
35d0b7a
Compare
Collaborator
Author
|
Oops, had to tweak the last commit cause I misunderstood doclinks, diff is trivial, so will land after CI: |
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 #980.