Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions eclair-core/src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,11 @@ eclair {
smoothing-window = 6 // 1 = no smoothing

default-feerates { // the following values are in satoshis per byte
minimum = 5
slow = 5
medium = 10
fast = 20
fastest = 30
minimum = 1
slow = 2
medium = 5
fast = 10
fastest = 20
}

// confirmation priority for each transaction type, can be slow/medium/fast
Expand Down
6 changes: 5 additions & 1 deletion eclair-core/src/main/scala/fr/acinq/eclair/Setup.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import akka.actor.typed.scaladsl.adapter.{ClassicActorRefOps, ClassicActorSystem
import akka.actor.{ActorRef, ActorSystem, Props, SupervisorStrategy, typed}
import akka.pattern.after
import akka.util.Timeout
import fr.acinq.bitcoin.scalacompat.Crypto.PublicKey
import fr.acinq.bitcoin.scalacompat.{Block, BlockHash, BlockId, ByteVector32, Satoshi, Script, ScriptElt, addressToPublicKeyScript}
import fr.acinq.eclair.NodeParams.hashFromChain
import fr.acinq.eclair.Setup.Seeds
Expand Down Expand Up @@ -250,7 +249,12 @@ class Setup(val datadir: File,
feeProvider = nodeParams.chainHash match {
case Block.RegtestGenesisBlock.hash | Block.SignetGenesisBlock.hash =>
FallbackFeeProvider(ConstantFeeProvider(defaultFeerates) :: Nil, minFeeratePerByte)
case Block.Testnet3GenesisBlock.hash | Block.Testnet4GenesisBlock.hash =>
// On testnet, we fallback to default feerates when there aren't enough block data to estimate fees.
val smoothFeerateWindow = config.getInt("on-chain-fees.smoothing-window")
FallbackFeeProvider(SmoothFeeProvider(BitcoinCoreFeeProvider(bitcoin, defaultFeerates), smoothFeerateWindow) :: ConstantFeeProvider(defaultFeerates) :: Nil, minFeeratePerByte)
case _ =>
// On mainnet, we always use blockchain data to estimate fees and ignore configured fallbacks.
val smoothFeerateWindow = config.getInt("on-chain-fees.smoothing-window")
FallbackFeeProvider(SmoothFeeProvider(BitcoinCoreFeeProvider(bitcoin, defaultFeerates), smoothFeerateWindow) :: Nil, minFeeratePerByte)
}
Expand Down