pay: Add channel_hint_set_count primitive
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user