]> git.bitcoin.ninja Git - rust-lightning/commitdiff
document optional channel constraints per spec
authorYuntai Kyong <yuntai.kyong@gmail.com>
Tue, 14 Aug 2018 16:18:10 +0000 (01:18 +0900)
committerMatt Corallo <git@bluematt.me>
Fri, 17 Aug 2018 17:18:28 +0000 (13:18 -0400)
src/ln/channel.rs

index 93e164809b08f63b942d4c9cd45ed034cb6fbef3..f3455a9f5c71eef0642e15a8101c9ba2888ba023 100644 (file)
@@ -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;