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.
This commit is contained in:
Christian Decker 2022-06-24 12:55:09 +02:00
parent 67467213cb
commit 1bd3d8d9f9

View File

@ -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;
}