@@ -49,9 +49,9 @@ const TIME_TO_CONTEST_FRAUDULENT_TXNS: u16 = 6 * 24 * 7;
4949const TIME_TO_CONTEST_FRAUDULENT_TXNS : u16 = BREAKDOWN_TIMEOUT ;
5050
5151pub const USER_CONFIG : UserConfig = UserConfig {
52- own_channel_config : OWN_CHANNEL_CONFIG ,
53- peer_channel_config_limits : PEER_CHANNEL_CONFIG_LIMITS ,
54- channel_options : CHANNEL_OPTIONS ,
52+ channel_handshake_config : CHANNEL_HANDSHAKE_CONFIG ,
53+ channel_handshake_limits : CHANNEL_HANDSHAKE_LIMITS ,
54+ channel_config : CHANNEL_CONFIG ,
5555
5656 // Do not accept any HTLC forwarding risks
5757 accept_forwards_to_priv_channels : false ,
@@ -63,24 +63,33 @@ pub const USER_CONFIG: UserConfig = UserConfig {
6363 manually_accept_inbound_channels : false ,
6464} ;
6565
66- const OWN_CHANNEL_CONFIG : ChannelHandshakeConfig = ChannelHandshakeConfig {
67- // Wait 6 confirmations for channels to be considered locked-in.
68- minimum_depth : 6 ,
69- // Require the channel counterparty (Lexe's LSPs) to wait <this param> to
70- // claim funds in the case of a unilateral close. Specified in # of blocks.
71- our_to_self_delay : TIME_TO_CONTEST_FRAUDULENT_TXNS ,
72- // Allow extremely small HTLCs
73- our_htlc_minimum_msat : 1 ,
74- // Allow up to 100% of our funds to be encumbered in inbound HTLCS.
75- max_inbound_htlc_value_in_flight_percent_of_channel : 100 ,
76- // Attempt to use better privacy. The LSP should have this enabled.
77- negotiate_scid_privacy : true ,
78- } ;
66+ const CHANNEL_HANDSHAKE_CONFIG : ChannelHandshakeConfig =
67+ ChannelHandshakeConfig {
68+ // Wait 6 confirmations for channels to be considered locked-in.
69+ minimum_depth : 6 ,
70+ // Require the channel counterparty (Lexe's LSPs) to wait <this param>
71+ // to claim funds in the case of a unilateral close. Specified
72+ // in # of blocks.
73+ our_to_self_delay : TIME_TO_CONTEST_FRAUDULENT_TXNS ,
74+ // Allow extremely small HTLCs
75+ our_htlc_minimum_msat : 1 ,
76+ // Allow up to 100% of our funds to be encumbered in inbound HTLCS.
77+ max_inbound_htlc_value_in_flight_percent_of_channel : 100 ,
78+ // Attempt to use better privacy. The LSP should have this enabled.
79+ negotiate_scid_privacy : true ,
80+ // Do not publically announce our channels
81+ announced_channel : false ,
82+ // The additional 'security' provided by setting is pointless.
83+ // Additionally, we do not want to commit to a `shutdown_pubkey`
84+ // so that it is possible to sweep all funds to an address
85+ // specified at the time of channel close.
86+ commit_upfront_shutdown_pubkey : false ,
87+ } ;
7988
80- const PEER_CHANNEL_CONFIG_LIMITS : ChannelHandshakeLimits =
89+ const CHANNEL_HANDSHAKE_LIMITS : ChannelHandshakeLimits =
8190 ChannelHandshakeLimits {
8291 // Force an incoming channel (from the LSP) to match the value we set
83- // for `ChannelConfig ::announced_channel` (which is false)
92+ // for `ChannelHandshakeConfig ::announced_channel` (which is false)
8493 force_announced_channel_preference : true ,
8594 // *We* (the node) wait a maximum of 6 * 24 blocks (1 day) to reclaim
8695 // our funds in the case of a unilateral close initiated by us.
@@ -97,19 +106,13 @@ const PEER_CHANNEL_CONFIG_LIMITS: ChannelHandshakeLimits =
97106 max_minimum_depth : 144 ,
98107 } ;
99108
100- const CHANNEL_OPTIONS : ChannelConfig = ChannelConfig {
109+ const CHANNEL_CONFIG : ChannelConfig = ChannelConfig {
101110 // (proportional fee) We do not forward anything so this can be 0
102111 forwarding_fee_proportional_millionths : 0 ,
103112 // (base fee) We do not forward anything so this can be 0
104113 forwarding_fee_base_msat : 0 ,
105114 // We do not forward anything so this can be the minimum
106115 cltv_expiry_delta : MIN_CLTV_EXPIRY_DELTA ,
107- // Do not publically announce our channels
108- announced_channel : false ,
109- // The additional 'security' provided by setting is pointless. Additionally,
110- // we do not want to commit to a `shutdown_pubkey` so that it is possible to
111- // sweep all funds to an address specified at the time of channel close.
112- commit_upfront_shutdown_pubkey : false ,
113116 // LDK default
114117 max_dust_htlc_exposure_msat : 5_000_000 ,
115118 // Pay up to 1000 sats (50 cents assuming $50K per BTC) to avoid waiting up
0 commit comments