From: Yuntai Kyong Date: Tue, 14 Aug 2018 16:18:10 +0000 (+0900) Subject: document optional channel constraints per spec X-Git-Tag: v0.0.12~347^2~3 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=716b37863a553de6fcf83202d5e1294a47e7660f;p=rust-lightning document optional channel constraints per spec --- 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;