Skip to content

Commit 146f357

Browse files
config: add max_funding_satoshis to enforce for inbound channels
1 parent 30ba081 commit 146f357

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lightning/src/util/config.rs

+8
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ pub struct ChannelHandshakeLimits {
100100
///
101101
/// Default value: 0.
102102
pub min_funding_satoshis: u64,
103+
/// Maximum allowed satoshis when a channel is funded, this is supplied by the sender and so
104+
/// only applies to inbound channels.
105+
///
106+
/// Default value: 2^24.
107+
// Note that this default was chosen because it was the maximum funding amount prior to wumbo
108+
// channels being introduced.
109+
pub max_funding_satoshis: u64,
103110
/// The remote node sets a limit on the minimum size of HTLCs we can send to them. This allows
104111
/// you to limit the maximum minimum-size they can require.
105112
///
@@ -151,6 +158,7 @@ impl Default for ChannelHandshakeLimits {
151158
fn default() -> Self {
152159
ChannelHandshakeLimits {
153160
min_funding_satoshis: 0,
161+
max_funding_satoshis: 1 << 24,
154162
max_htlc_minimum_msat: <u64>::max_value(),
155163
min_max_htlc_value_in_flight_msat: 0,
156164
max_channel_reserve_satoshis: <u64>::max_value(),

0 commit comments

Comments
 (0)