1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-02-24 14:50:46 +01:00

Move fee provider configuration section (#1631)

* move and rename fee provider parameters

* set the min-feerate to 1 sat/byte

This only affects the value returned by fee providers, it is
overriden by the other bitcoin-core enforced minimum (currently 253
sat/kiloweight).
This commit is contained in:
Pierre-Marie Padiou 2020-12-14 17:11:08 +01:00 committed by GitHub
parent 0e5ec4dce9
commit e8b47e14a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 8 deletions

View file

@ -36,10 +36,6 @@ eclair {
zmqtx = "tcp://127.0.0.1:29000"
}
min-feerate = 2 // minimum feerate in satoshis per byte
smooth-feerate-window = 6 // 1 = no smoothing
feerate-provider-timeout = 5 seconds // max time we'll wait for answers from a fee provider before we fallback to the next one
node-alias = "eclair"
node-color = "49daaa"
@ -92,6 +88,10 @@ eclair {
fee-proportional-millionths = 100 // fee charged per transferred satoshi in millionths of a satoshi (100 = 0.01%)
on-chain-fees {
min-feerate = 1 // minimum feerate in satoshis per byte
smoothing-window = 6 // 1 = no smoothing
provider-timeout = 5 seconds // max time we'll wait for answers from a fee provider before we fallback to the next one
default-feerates { // those are per target block, in satoshis per kilobyte
1 = 210000
2 = 180000

View file

@ -194,7 +194,11 @@ object NodeParams extends Logging {
"global-features" -> "features",
"local-features" -> "features",
// v0.4.1
"on-chain-fees.max-feerate-mismatch" -> "on-chain-fees.feerate-tolerance.ratio-low / on-chain-fees.feerate-tolerance.ratio-high"
"on-chain-fees.max-feerate-mismatch" -> "on-chain-fees.feerate-tolerance.ratio-low / on-chain-fees.feerate-tolerance.ratio-high",
// v0.4.3
"min-feerate" -> "on-chain-fees.min-feerate",
"smooth-feerate-window" -> "on-chain-fees.smoothing-window",
"feerate-provider-timeout" -> "on-chain-fees.provider-timeout"
)
deprecatedKeyPaths.foreach {
case (old, new_) => require(!config.hasPath(old), s"configuration key '$old' has been replaced by '$new_'")

View file

@ -238,9 +238,9 @@ class Setup(datadir: File,
feeratesPerKw.set(FeeratesPerKw(confDefaultFeerates))
confDefaultFeerates
}
minFeeratePerByte = FeeratePerByte(Satoshi(config.getLong("min-feerate")))
smoothFeerateWindow = config.getInt("smooth-feerate-window")
readTimeout = FiniteDuration(config.getDuration("feerate-provider-timeout", TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS)
minFeeratePerByte = FeeratePerByte(Satoshi(config.getLong("on-chain-fees.min-feerate")))
smoothFeerateWindow = config.getInt("on-chain-fees.smoothing-window")
readTimeout = FiniteDuration(config.getDuration("on-chain-fees.provider-timeout", TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS)
feeProvider = (nodeParams.chainHash, bitcoin) match {
case (Block.RegtestGenesisBlock.hash, _) =>
new FallbackFeeProvider(new ConstantFeeProvider(defaultFeerates) :: Nil, minFeeratePerByte)