Log chain calls in ChainMonitor, reducing logs in ChannelMonitor
authorMatt Corallo <git@bluematt.me>
Tue, 17 Aug 2021 00:46:21 +0000 (00:46 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 17 Aug 2021 21:03:14 +0000 (21:03 +0000)
commit1e7d4798eb531ae3255b2fb82f07af81b56019a3
treec8594b3e47929e3dce89ebb20b474e05bc4e4a2a
parentecf1d656ef4b48a155797e5825359ba2bb670d19
Log chain calls in ChainMonitor, reducing logs in ChannelMonitor

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 #980.
lightning/src/chain/chainmonitor.rs
lightning/src/chain/channelmonitor.rs