Uh oh!
There was an error while loading. Please reload this page.
Remove explicit print in lightning-net-tokio, reduce redundant block connection logging - #1048
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
cf84655 to
0fa452eCompareCodecov 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.
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
TheBlueMatt
commented
Aug 17, 2021
Addressed feedback and added one more commit to clean up docs. |
| } | ||
| fn transaction_unconfirmed(&self, txid: &Txid) { | ||
| log_debug!(self.logger, "{} reorganized out of chain", txid); |
There was a problem hiding this comment.
suggestion: s/{}/txid {}
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. Fixeslightningdevkit#980.
77178c6 to
5d84704CompareTheBlueMatt
commented
Aug 17, 2021
Pushed a trivial change as suggested by val and squashed, diff from Jeff's ACK: |
This is especially important for C or other language bindings clients as the `version` field may be exported as a `u8`.
5d84704 to
35d0b7aCompareTheBlueMatt
commented
Aug 17, 2021
Oops, had to tweak the last commit cause I misunderstood doclinks, diff is trivial, so will land after CI: |
Fixes#980.