mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
askrene: remove unused parameter in layer_add_localmods.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
321ec0875f
commit
fcc0d2bad8
3 changed files with 5 additions and 13 deletions
|
@ -293,7 +293,7 @@ static const char *get_routes(const tal_t *ctx,
|
|||
|
||||
tal_arr_expand(&rq->layers, l);
|
||||
/* FIXME: Implement localmods_merge, and cache this in layer? */
|
||||
layer_add_localmods(l, rq->gossmap, false, localmods);
|
||||
layer_add_localmods(l, rq->gossmap, localmods);
|
||||
|
||||
/* Clear any entries in capacities array if we
|
||||
* override them (incl local channels) */
|
||||
|
|
|
@ -305,7 +305,6 @@ void layer_add_disabled_channel(struct layer *layer, const struct short_channel_
|
|||
|
||||
void layer_add_localmods(const struct layer *layer,
|
||||
const struct gossmap *gossmap,
|
||||
bool zero_cost,
|
||||
struct gossmap_localmods *localmods)
|
||||
{
|
||||
const struct local_channel *lc;
|
||||
|
@ -345,20 +344,14 @@ void layer_add_localmods(const struct layer *layer,
|
|||
gossmap_local_addchan(localmods,
|
||||
&lc->n1, &lc->n2, lc->scid, NULL);
|
||||
for (size_t i = 0; i < ARRAY_SIZE(lc->half); i++) {
|
||||
u64 base, propfee, delay;
|
||||
if (!lc->half[i].enabled)
|
||||
continue;
|
||||
if (zero_cost) {
|
||||
base = propfee = delay = 0;
|
||||
} else {
|
||||
base = lc->half[i].base_fee.millisatoshis; /* Raw: gossmap */
|
||||
propfee = lc->half[i].proportional_fee;
|
||||
delay = lc->half[i].delay;
|
||||
}
|
||||
gossmap_local_updatechan(localmods, lc->scid,
|
||||
lc->half[i].htlc_min,
|
||||
lc->half[i].htlc_max,
|
||||
base, propfee, delay,
|
||||
lc->half[i].base_fee.millisatoshis, /* Raw: gossmap */
|
||||
lc->half[i].proportional_fee,
|
||||
lc->half[i].delay,
|
||||
true,
|
||||
i);
|
||||
}
|
||||
|
|
|
@ -82,10 +82,9 @@ const struct constraint *layer_update_constraint(struct layer *layer,
|
|||
const struct amount_msat *min,
|
||||
const struct amount_msat *max);
|
||||
|
||||
/* Add local channels from this layer. zero_cost means set fees and delay to 0. */
|
||||
/* Add local channels from this layer. */
|
||||
void layer_add_localmods(const struct layer *layer,
|
||||
const struct gossmap *gossmap,
|
||||
bool zero_cost,
|
||||
struct gossmap_localmods *localmods);
|
||||
|
||||
/* Remove constraints older then cutoff: returns num removed. */
|
||||
|
|
Loading…
Add table
Reference in a new issue