diff --git a/plugins/channel_hint.c b/plugins/channel_hint.c index d1af3012a..4410939f8 100644 --- a/plugins/channel_hint.c +++ b/plugins/channel_hint.c @@ -205,3 +205,8 @@ void channel_hint_set_update(struct channel_hint_set *set, for (size_t i = 0; i < tal_count(set->hints); i++) channel_hint_update(time_now(), &set->hints[i]); } + +size_t channel_hint_set_count(const struct channel_hint_set *set) +{ + return tal_count(set->hints); +} diff --git a/plugins/channel_hint.h b/plugins/channel_hint.h index 1b09dd18c..d53cc10d5 100644 --- a/plugins/channel_hint.h +++ b/plugins/channel_hint.h @@ -87,4 +87,9 @@ struct channel_hint *channel_hint_set_add(struct channel_hint_set *self, const struct amount_sat overall_capacity, u16 *htlc_budget); +/** + * Count how many channel_hints the set contains. + */ +size_t channel_hint_set_count(const struct channel_hint_set *set); + #endif /* LIGHTNING_PLUGINS_CHANNEL_HINT_H */ diff --git a/plugins/libplugin-pay.c b/plugins/libplugin-pay.c index ebaea797c..25d339f4a 100644 --- a/plugins/libplugin-pay.c +++ b/plugins/libplugin-pay.c @@ -160,10 +160,6 @@ struct payment *payment_new(tal_t *ctx, struct command *cmd, tal_arr_expand(&p->modifier_data, NULL); } - paymod_log(p, LOG_DBG, - "Initialized a new (sub-)payment with %zu channel_hints", - tal_count(payment_root(p)->hints->hints)); - return p; }