You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reduce the maximum allowed counterparty dust limit to 546 sat/vbyte
546 sat/vbyte is the current default dust limit on most
implementations, matching the network dust limit for P2SH outputs.
Implementations don't currently appear to send any larger dust
limits, and allowing a larger dust limit implies higher payment
failure risk, so we'd like to be as tight as we can here.
if msg.dust_limit_satoshis < MIN_DUST_LIMIT_SATOSHIS{
848
848
returnErr(ChannelError::Close(format!("dust_limit_satoshis ({}) is less than the implementation limit ({})", msg.dust_limit_satoshis,MIN_DUST_LIMIT_SATOSHIS)));
849
849
}
850
-
if msg.dust_limit_satoshis > MAX_DUST_LIMIT_SATOSHIS{
851
-
returnErr(ChannelError::Close(format!("dust_limit_satoshis ({}) is greater than the implementation limit ({})", msg.dust_limit_satoshis,MAX_DUST_LIMIT_SATOSHIS)));
850
+
if msg.dust_limit_satoshis > MAX_CHAN_DUST_LIMIT_SATOSHIS{
851
+
returnErr(ChannelError::Close(format!("dust_limit_satoshis ({}) is greater than the implementation limit ({})", msg.dust_limit_satoshis,MAX_CHAN_DUST_LIMIT_SATOSHIS)));
852
852
}
853
853
854
854
// Convert things into internal flags and prep our state:
if msg.dust_limit_satoshis < MIN_DUST_LIMIT_SATOSHIS{
1622
1622
returnErr(ChannelError::Close(format!("dust_limit_satoshis ({}) is less than the implementation limit ({})", msg.dust_limit_satoshis,MIN_DUST_LIMIT_SATOSHIS)));
1623
1623
}
1624
-
if msg.dust_limit_satoshis > MAX_DUST_LIMIT_SATOSHIS{
1625
-
returnErr(ChannelError::Close(format!("dust_limit_satoshis ({}) is greater than the implementation limit ({})", msg.dust_limit_satoshis,MAX_DUST_LIMIT_SATOSHIS)));
1624
+
if msg.dust_limit_satoshis > MAX_CHAN_DUST_LIMIT_SATOSHIS{
1625
+
returnErr(ChannelError::Close(format!("dust_limit_satoshis ({}) is greater than the implementation limit ({})", msg.dust_limit_satoshis,MAX_CHAN_DUST_LIMIT_SATOSHIS)));
1626
1626
}
1627
1627
if msg.minimum_depth > config.peer_channel_config_limits.max_minimum_depth{
1628
1628
returnErr(ChannelError::Close(format!("We consider the minimum depth to be unreasonably large. Expected minimum: ({}). Actual: ({})", config.peer_channel_config_limits.max_minimum_depth, msg.minimum_depth)));
0 commit comments