projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fa59544
)
config: add max_funding_satoshis to enforce for inbound channels
author
Valentine Wallace
<vwallace@protonmail.com>
Fri, 15 Apr 2022 21:34:59 +0000
(17:34 -0400)
committer
Valentine Wallace
<vwallace@protonmail.com>
Thu, 28 Apr 2022 19:01:17 +0000
(15:01 -0400)
and a bonus grammar fix
lightning/src/util/config.rs
patch
|
blob
|
history
diff --git
a/lightning/src/util/config.rs
b/lightning/src/util/config.rs
index bd8b40b66567e8a5346e8e551568aaf1d539eae5..0f625098f79f9030ae25ddc1979cc6b5fcba30ae 100644
(file)
--- a/
lightning/src/util/config.rs
+++ b/
lightning/src/util/config.rs
@@
-10,6
+10,7
@@
//! Various user-configurable channel limits and settings which ChannelManager
//! applies for you.
//! Various user-configurable channel limits and settings which ChannelManager
//! applies for you.
+use ln::channel::MAX_FUNDING_SATOSHIS_NO_WUMBO;
use ln::channelmanager::{BREAKDOWN_TIMEOUT, MAX_LOCAL_BREAKDOWN_TIMEOUT};
/// Configuration we set when applicable.
use ln::channelmanager::{BREAKDOWN_TIMEOUT, MAX_LOCAL_BREAKDOWN_TIMEOUT};
/// Configuration we set when applicable.
@@
-95,11
+96,16
@@
impl Default for ChannelHandshakeConfig {
/// are applied mostly only to incoming channels that's not much of a problem.
#[derive(Copy, Clone, Debug)]
pub struct ChannelHandshakeLimits {
/// are applied mostly only to incoming channels that's not much of a problem.
#[derive(Copy, Clone, Debug)]
pub struct ChannelHandshakeLimits {
- /// Minimum allowed satoshis when a channel is funded
, t
his is supplied by the sender and so
+ /// Minimum allowed satoshis when a channel is funded
. T
his is supplied by the sender and so
/// only applies to inbound channels.
///
/// Default value: 0.
pub min_funding_satoshis: u64,
/// only applies to inbound channels.
///
/// Default value: 0.
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.
+ ///
+ /// Default value: 2^24 - 1.
+ pub max_funding_satoshis: u64,
/// The remote node sets a limit on the minimum size of HTLCs we can send to them. This allows
/// you to limit the maximum minimum-size they can require.
///
/// The remote node sets a limit on the minimum size of HTLCs we can send to them. This allows
/// you to limit the maximum minimum-size they can require.
///
@@
-151,6
+157,7
@@
impl Default for ChannelHandshakeLimits {
fn default() -> Self {
ChannelHandshakeLimits {
min_funding_satoshis: 0,
fn default() -> Self {
ChannelHandshakeLimits {
min_funding_satoshis: 0,
+ max_funding_satoshis: MAX_FUNDING_SATOSHIS_NO_WUMBO,
max_htlc_minimum_msat: <u64>::max_value(),
min_max_htlc_value_in_flight_msat: 0,
max_channel_reserve_satoshis: <u64>::max_value(),
max_htlc_minimum_msat: <u64>::max_value(),
min_max_htlc_value_in_flight_msat: 0,
max_channel_reserve_satoshis: <u64>::max_value(),