From 1bd3d8d9f98991c1958dda66ffaae3e0887fbd98 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Fri, 24 Jun 2022 12:55:09 +0200 Subject: [PATCH] openingd: Remove dust check for reserve imposed on us This check, while in line with the specification, would cause issues in mixed setups when the funder or fundee allows dust reserves, but the counterparty does not. It is not an issue for the non-dust reserve node since in this case it's the peer giving us more flexibility not the other way around. --- openingd/common.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/openingd/common.c b/openingd/common.c index 493ee4472..92a0e9b22 100644 --- a/openingd/common.c +++ b/openingd/common.c @@ -180,26 +180,6 @@ bool check_config_bounds(const tal_t *ctx, return false; } -#ifndef ZERORESERVE - /* BOLT #2: - * - * The receiving node MUST fail the channel if: - *... - * - `dust_limit_satoshis` is greater than `channel_reserve_satoshis`. - */ - if (amount_sat_greater(remoteconf->dust_limit, - remoteconf->channel_reserve)) { - *err_reason = tal_fmt(ctx, - "dust_limit_satoshis %s" - " too large for channel_reserve_satoshis %s", - type_to_string(ctx, struct amount_sat, - &remoteconf->dust_limit), - type_to_string(ctx, struct amount_sat, - &remoteconf->channel_reserve)); - return false; - } -#endif - return true; }