From 015627cdee01f0a3cfd379e6ad25e7ea7dc4c090 Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Sun, 10 Oct 2021 15:23:56 +0200 Subject: [PATCH] Fixes msat and sat convention in the error message Signed-off-by: Vincenzo Palazzo --- openingd/common.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openingd/common.c b/openingd/common.c index 0a869bfa0..f9b0b112c 100644 --- a/openingd/common.c +++ b/openingd/common.c @@ -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," @@ -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; }