From b6d65752f760d079da01dbd563eaa405e1ec277e Mon Sep 17 00:00:00 2001 From: bitromortac Date: Thu, 16 Mar 2023 10:03:50 +0100 Subject: [PATCH] routing: add and fix log statements --- routing/probability_bimodal.go | 8 +++++++- routing/router.go | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/routing/probability_bimodal.go b/routing/probability_bimodal.go index daa086fa9..3a9beb589 100644 --- a/routing/probability_bimodal.go +++ b/routing/probability_bimodal.go @@ -455,11 +455,17 @@ func (p *BimodalEstimator) probabilityFormula(capacityMsat, successAmountMsat, // failAmount should be capacity at max. if failAmount > capacity { + log.Debugf("Correcting failAmount %v to capacity %v", + failAmount, capacity) + failAmount = capacity } // successAmount should be capacity at max. if successAmount > capacity { + log.Debugf("Correcting successAmount %v to capacity %v", + successAmount, capacity) + successAmount = capacity } @@ -468,7 +474,7 @@ func (p *BimodalEstimator) probabilityFormula(capacityMsat, successAmountMsat, // happen if a large channel gets closed and smaller ones remain, but // it should recover with the time decay. if failAmount <= successAmount { - log.Tracef("fail amount (%v) is larger than or equal the "+ + log.Tracef("fail amount (%v) is smaller than or equal the "+ "success amount (%v) for capacity (%v)", failAmountMsat, successAmountMsat, capacityMsat) diff --git a/routing/router.go b/routing/router.go index eea5189d9..39b47e792 100644 --- a/routing/router.go +++ b/routing/router.go @@ -1689,7 +1689,7 @@ func (r *ChannelRouter) processUpdate(msg interface{}, return err } - log.Debugf("New channel update applied: %v", + log.Tracef("New channel update applied: %v", newLogClosure(func() string { return spew.Sdump(msg) })) r.stats.incNumChannelUpdates()