askrene: more logging in explain_failure.

Lagrang3 doesn't like the logging in here at all, but he suggested we at
least be consistent!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2024-10-13 09:53:45 +10:30
parent 95c5fda79f
commit 318e49e9c7

View file

@ -133,7 +133,7 @@ static const char *check_capacity(const tal_t *ctx,
node_stats(rq, node, node_direction, &stats);
if (amount_msat_greater(amount, stats.total.capacity)) {
return tal_fmt(ctx,
return rq_log(ctx, rq, LOG_DBG,
NO_USABLE_PATHS_STRING
" Total %s capacity is only %s"
" (in %zu channels).",
@ -142,7 +142,7 @@ static const char *check_capacity(const tal_t *ctx,
stats.total.num_channels);
}
if (amount_msat_greater(amount, stats.gossip_known.capacity)) {
return tal_fmt(ctx,
return rq_log(ctx, rq, LOG_DBG,
NO_USABLE_PATHS_STRING
" Missing gossip for %s: only known %zu/%zu channels, leaving capacity only %s of %s.",
name,
@ -152,7 +152,7 @@ static const char *check_capacity(const tal_t *ctx,
fmt_amount_msat(tmpctx, stats.total.capacity));
}
if (amount_msat_greater(amount, stats.enabled.capacity)) {
return tal_fmt(ctx,
return rq_log(ctx, rq, LOG_DBG,
NO_USABLE_PATHS_STRING
" The %s has disabled %zu of %zu channels, leaving capacity only %s of %s.",
name,