Skip to content

Commit

Permalink
Fixes msat and sat convention in the error message
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <[email protected]>
  • Loading branch information
vincenzopalazzo authored and rustyrussell committed Oct 13, 2021
1 parent 67220ca commit 015627c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions openingd/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ bool check_config_bounds(const tal_t *ctx,
* set by lightningd, don't bother opening it. */
if (amount_msat_greater_sat(min_effective_htlc_capacity,
capacity)) {
struct amount_sat min_effective_htlc_capacity_sat =
amount_msat_to_sat_round_down(min_effective_htlc_capacity);

*err_reason = tal_fmt(ctx,
"channel capacity with funding %s,"
" reserves %s/%s,"
Expand All @@ -148,8 +151,8 @@ bool check_config_bounds(const tal_t *ctx,
&remoteconf->max_htlc_value_in_flight),
type_to_string(ctx, struct amount_sat,
&capacity),
type_to_string(ctx, struct amount_msat,
&min_effective_htlc_capacity));
type_to_string(ctx, struct amount_sat,
&min_effective_htlc_capacity_sat));
return false;
}

Expand Down

0 comments on commit 015627c

Please sign in to comment.