|
10 | 10 | //! Various user-configurable channel limits and settings which ChannelManager
|
11 | 11 | //! applies for you.
|
12 | 12 |
|
| 13 | +use ln::channel::MAX_FUNDING_SATOSHIS_NO_WUMBO; |
13 | 14 | use ln::channelmanager::{BREAKDOWN_TIMEOUT, MAX_LOCAL_BREAKDOWN_TIMEOUT};
|
14 | 15 |
|
15 | 16 | /// Configuration we set when applicable.
|
@@ -95,11 +96,16 @@ impl Default for ChannelHandshakeConfig {
|
95 | 96 | /// are applied mostly only to incoming channels that's not much of a problem.
|
96 | 97 | #[derive(Copy, Clone, Debug)]
|
97 | 98 | pub struct ChannelHandshakeLimits {
|
98 |
| - /// Minimum allowed satoshis when a channel is funded, this is supplied by the sender and so |
| 99 | + /// Minimum allowed satoshis when a channel is funded. This is supplied by the sender and so |
99 | 100 | /// only applies to inbound channels.
|
100 | 101 | ///
|
101 | 102 | /// Default value: 0.
|
102 | 103 | pub min_funding_satoshis: u64,
|
| 104 | + /// Maximum allowed satoshis when a channel is funded. This is supplied by the sender and so |
| 105 | + /// only applies to inbound channels. |
| 106 | + /// |
| 107 | + /// Default value: 2^24 - 1. |
| 108 | + pub max_funding_satoshis: u64, |
103 | 109 | /// The remote node sets a limit on the minimum size of HTLCs we can send to them. This allows
|
104 | 110 | /// you to limit the maximum minimum-size they can require.
|
105 | 111 | ///
|
@@ -151,6 +157,7 @@ impl Default for ChannelHandshakeLimits {
|
151 | 157 | fn default() -> Self {
|
152 | 158 | ChannelHandshakeLimits {
|
153 | 159 | min_funding_satoshis: 0,
|
| 160 | + max_funding_satoshis: MAX_FUNDING_SATOSHIS_NO_WUMBO, |
154 | 161 | max_htlc_minimum_msat: <u64>::max_value(),
|
155 | 162 | min_max_htlc_value_in_flight_msat: 0,
|
156 | 163 | max_channel_reserve_satoshis: <u64>::max_value(),
|
|
0 commit comments