mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-26 21:51:27 +02:00
multi: optimize loggings around changes from blockbeat
This commit is contained in:
@@ -79,7 +79,7 @@ func (b *BeatConsumer) ProcessBlock(beat Blockbeat) error {
|
||||
// `beat.NotifyBlockProcessed` to send the error back here.
|
||||
select {
|
||||
case err := <-b.errChan:
|
||||
beat.logger().Debugf("[%s] processed beat: err=%v", b.name, err)
|
||||
beat.logger().Tracef("[%s] processed beat: err=%v", b.name, err)
|
||||
|
||||
return err
|
||||
|
||||
@@ -99,11 +99,11 @@ func (b *BeatConsumer) ProcessBlock(beat Blockbeat) error {
|
||||
// processing the block.
|
||||
func (b *BeatConsumer) NotifyBlockProcessed(beat Blockbeat, err error) {
|
||||
// Update the current height.
|
||||
beat.logger().Debugf("[%s]: notifying beat processed", b.name)
|
||||
beat.logger().Tracef("[%s]: notifying beat processed", b.name)
|
||||
|
||||
select {
|
||||
case b.errChan <- err:
|
||||
beat.logger().Debugf("[%s]: notified beat processed, err=%v",
|
||||
beat.logger().Tracef("[%s]: notified beat processed, err=%v",
|
||||
b.name, err)
|
||||
|
||||
case <-b.quit:
|
||||
|
@@ -9,6 +9,7 @@ import (
|
||||
|
||||
"github.com/btcsuite/btclog/v2"
|
||||
"github.com/lightningnetwork/lnd/chainntnfs"
|
||||
"github.com/lightningnetwork/lnd/lnutils"
|
||||
"golang.org/x/sync/errgroup"
|
||||
)
|
||||
|
||||
@@ -136,6 +137,10 @@ func (b *BlockbeatDispatcher) dispatchBlocks(
|
||||
return
|
||||
}
|
||||
|
||||
// Log a separator so it's easier to identify when a
|
||||
// new block arrives for subsystems.
|
||||
clog.Debugf("%v", lnutils.NewSeparatorClosure())
|
||||
|
||||
clog.Infof("Received new block %v at height %d, "+
|
||||
"notifying consumers...", blockEpoch.Hash,
|
||||
blockEpoch.Height)
|
||||
|
Reference in New Issue
Block a user