X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Futil%2Fconfig.rs;h=ba00158c635f5ef7fb85663b9bc8702b03695e28;hb=4f806f56605e672fcfa8d87c03c036e32e0995b3;hp=b32e8660d0a8b3490c2f06f15206760a7725f6eb;hpb=153b04833201d1de59104ed2671fafeb2b8ad509;p=rust-lightning diff --git a/lightning/src/util/config.rs b/lightning/src/util/config.rs index b32e8660..ba00158c 100644 --- a/lightning/src/util/config.rs +++ b/lightning/src/util/config.rs @@ -170,6 +170,19 @@ pub struct ChannelHandshakeConfig { /// [`DecodeError::InvalidValue`]: crate::ln::msgs::DecodeError::InvalidValue /// [`SIGHASH_SINGLE + update_fee Considered Harmful`]: https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-September/002796.html pub negotiate_anchors_zero_fee_htlc_tx: bool, + + /// The maximum number of HTLCs in-flight from our counterparty towards us at the same time. + /// + /// Increasing the value can help improve liquidity and stability in + /// routing at the cost of higher long term disk / DB usage. + /// + /// Note: Versions of LDK earlier than v0.0.115 will fail to read channels with a configuration + /// other than the default value. + /// + /// Default value: 50 + /// Maximum value: 483, any values larger will be treated as 483. + /// This is the BOLT #2 spec limit on `max_accepted_htlcs`. + pub our_max_accepted_htlcs: u16, } impl Default for ChannelHandshakeConfig { @@ -185,6 +198,7 @@ impl Default for ChannelHandshakeConfig { their_channel_reserve_proportional_millionths: 10_000, #[cfg(anchors)] negotiate_anchors_zero_fee_htlc_tx: false, + our_max_accepted_htlcs: 50, } } } @@ -523,7 +537,7 @@ pub struct UserConfig { /// /// Default value: false. /// - /// [`Event::OpenChannelRequest`]: crate::util::events::Event::OpenChannelRequest + /// [`Event::OpenChannelRequest`]: crate::events::Event::OpenChannelRequest /// [`msgs::OpenChannel`]: crate::ln::msgs::OpenChannel /// [`msgs::AcceptChannel`]: crate::ln::msgs::AcceptChannel pub manually_accept_inbound_channels: bool, @@ -536,7 +550,7 @@ pub struct UserConfig { /// Default value: false. /// /// [`ChannelManager::get_intercept_scid`]: crate::ln::channelmanager::ChannelManager::get_intercept_scid - /// [`Event::HTLCIntercepted`]: crate::util::events::Event::HTLCIntercepted + /// [`Event::HTLCIntercepted`]: crate::events::Event::HTLCIntercepted pub accept_intercept_htlcs: bool, }