From 716b37863a553de6fcf83202d5e1294a47e7660f Mon Sep 17 00:00:00 2001 From: Yuntai Kyong Date: Wed, 15 Aug 2018 01:18:10 +0900 Subject: [PATCH] document optional channel constraints per spec --- src/ln/channel.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ln/channel.rs b/src/ln/channel.rs index 93e164809..f3455a9f5 100644 --- a/src/ln/channel.rs +++ b/src/ln/channel.rs @@ -1210,6 +1210,15 @@ impl Channel { return_error_message!("max_accpted_htlcs > 483"); } + // TODO: Optional additional constraints mentioned in the spec + // MAY fail the channel if + // funding_satoshi is too small + // htlc_minimum_msat too large + // max_htlc_value_in_flight_msat too small + // channel_reserve_satoshis too large + // max_accepted_htlcs too small + // dust_limit_satoshis too small + self.channel_monitor.set_their_htlc_base_key(&msg.htlc_basepoint); self.their_dust_limit_satoshis = msg.dust_limit_satoshis; -- 2.39.5