Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix two small topology issues #5286

Merged
merged 2 commits into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ bool route_can_carry(const struct gossmap *map,
struct amount_msat amount,
void *arg)
{
if (!c->half[dir].enabled || !c->half[!dir].enabled)
if (!c->half[dir].enabled)
return false;
return route_can_carry_even_disabled(map, c, dir, amount, arg);
}
Expand Down
6 changes: 3 additions & 3 deletions plugins/topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,9 @@ static struct amount_msat peer_capacity(const struct gossmap *gossmap,
continue;
if (!c->half[!dir].enabled)
continue;
if (!amount_msat_add(&capacity, capacity,
amount_msat(fp16_to_u64(c->half[dir]
.htlc_max))))
if (!amount_msat_add(
&capacity, capacity,
amount_msat(fp16_to_u64(c->half[!dir].htlc_max))))
continue;
}
return capacity;
Expand Down