Skip to content

Commit

Permalink
Add feerate_per_kw_range on three default policies
Browse files Browse the repository at this point in the history
  • Loading branch information
grunch committed Jan 3, 2022
1 parent 2264592 commit 5a31b28
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/channel/bolt/policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,7 @@ impl Policy {
pub fn with_clightning_defaults() -> Policy {
Policy {
to_self_delay_max: 14 * 24 * 6,
// I don't know what is the normal operational range for c-lightning
// but I only see values way more than 100 in examples like this
// https://github.com/ElementsProject/lightning/blob/335ef3fb69f923f6f30213f68881d10ee6d977ed/doc/PLUGINS.md#openchannel
// or tests like this https://github.com/ElementsProject/lightning/blob/master/tests/test_wallet.py#L594
//feerate_per_kw_range: 1..100,
feerate_per_kw_range: 1..1000,
minimum_depth: 3,
maximum_depth: Some(6),
funding_satoshis_min: Some(10000),
Expand All @@ -244,10 +240,7 @@ impl Policy {
pub fn with_lnd_defaults() -> Policy {
Policy {
to_self_delay_max: 14 * 24 * 6,
// I am not sure if this is the correct range for LND, even is the correct minimum
// I don't find the maximum value
// https://github.com/lightningnetwork/lnd/blob/master/lnwallet/chainfee/rates.go#L13
// feerate_per_kw_range: 253..?,
feerate_per_kw_range: 1..1000,
minimum_depth: 3,
maximum_depth: Some(6),
funding_satoshis_min: Some(20000),
Expand All @@ -270,8 +263,7 @@ impl Policy {
pub fn with_eclair_defaults() -> Policy {
Policy {
to_self_delay_max: 14 * 24 * 6,
// Same doubts as with LND and c-lightning about feerate_per_kw_range
//feerate_per_kw_range: 1..100,
feerate_per_kw_range: 1..1000,
minimum_depth: 3,
maximum_depth: Some(6),
funding_satoshis_min: Some(100000),
Expand Down

0 comments on commit 5a31b28

Please sign in to comment.