mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 23:08:36 +01:00
Set default ChannelHandshakeLimits::min_funding_satoshis to 1000
The original default value of 0 was inconsistent with the minimum requirement of 1000 satoshis in ChannelHandshakeConfig::their_channel_reserve_proportional_millionths.
This commit is contained in:
parent
1d9d911d1c
commit
779b194825
1 changed files with 16 additions and 26 deletions
|
@ -257,7 +257,8 @@ pub struct ChannelHandshakeLimits {
|
|||
/// Minimum allowed satoshis when a channel is funded. This is supplied by the sender and so
|
||||
/// only applies to inbound channels.
|
||||
///
|
||||
/// Default value: `0`
|
||||
/// Default value: `1000`
|
||||
/// (Minimum of [`ChannelHandshakeConfig::their_channel_reserve_proportional_millionths`])
|
||||
pub min_funding_satoshis: u64,
|
||||
/// Maximum allowed satoshis when a channel is funded. This is supplied by the sender and so
|
||||
/// only applies to inbound channels.
|
||||
|
@ -332,11 +333,11 @@ pub struct ChannelHandshakeLimits {
|
|||
impl Default for ChannelHandshakeLimits {
|
||||
fn default() -> Self {
|
||||
ChannelHandshakeLimits {
|
||||
min_funding_satoshis: 0,
|
||||
min_funding_satoshis: 1000,
|
||||
max_funding_satoshis: MAX_FUNDING_SATOSHIS_NO_WUMBO,
|
||||
max_htlc_minimum_msat: <u64>::max_value(),
|
||||
max_htlc_minimum_msat: u64::MAX,
|
||||
min_max_htlc_value_in_flight_msat: 0,
|
||||
max_channel_reserve_satoshis: <u64>::max_value(),
|
||||
max_channel_reserve_satoshis: u64::MAX,
|
||||
min_max_accepted_htlcs: 0,
|
||||
trust_own_funding_0conf: true,
|
||||
max_minimum_depth: 144,
|
||||
|
@ -670,6 +671,7 @@ impl crate::util::ser::Readable for ChannelConfig {
|
|||
|
||||
/// A parallel struct to [`ChannelConfig`] to define partial updates.
|
||||
#[allow(missing_docs)]
|
||||
#[derive(Default)]
|
||||
pub struct ChannelConfigUpdate {
|
||||
pub forwarding_fee_proportional_millionths: Option<u32>,
|
||||
pub forwarding_fee_base_msat: Option<u32>,
|
||||
|
@ -678,18 +680,6 @@ pub struct ChannelConfigUpdate {
|
|||
pub force_close_avoidance_max_fee_satoshis: Option<u64>,
|
||||
}
|
||||
|
||||
impl Default for ChannelConfigUpdate {
|
||||
fn default() -> ChannelConfigUpdate {
|
||||
ChannelConfigUpdate {
|
||||
forwarding_fee_proportional_millionths: None,
|
||||
forwarding_fee_base_msat: None,
|
||||
cltv_expiry_delta: None,
|
||||
max_dust_htlc_exposure_msat: None,
|
||||
force_close_avoidance_max_fee_satoshis: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ChannelConfig> for ChannelConfigUpdate {
|
||||
fn from(config: ChannelConfig) -> ChannelConfigUpdate {
|
||||
ChannelConfigUpdate {
|
||||
|
|
Loading…
Add table
Reference in a new issue