Skip to content

Commit

Permalink
Add support for signet
Browse files Browse the repository at this point in the history
  • Loading branch information
sstone committed Jun 21, 2023
1 parent 04613eb commit f69ec92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions eclair-core/src/main/scala/fr/acinq/eclair/Setup.scala
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ class Setup(val datadir: File,
feeProvider = nodeParams.chainHash match {
case Block.RegtestGenesisBlock.hash =>
FallbackFeeProvider(ConstantFeeProvider(defaultFeerates) :: Nil, minFeeratePerByte)
case Block.SignetGenesisBlock.hash =>
FallbackFeeProvider(ConstantFeeProvider(defaultFeerates) :: Nil, minFeeratePerByte)
case _ =>
FallbackFeeProvider(SmoothFeeProvider(BitcoinCoreFeeProvider(bitcoin, defaultFeerates), smoothFeerateWindow) :: Nil, minFeeratePerByte)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class LocalOnchainKeyManager(entropy: ByteVector, chainHash: ByteVector32, passp
// root bip32 onchain path
// we use BIP84 (p2wpkh) path: 84'/{0'/1'}
private val rootPath = chainHash match {
case Block.RegtestGenesisBlock.hash | Block.TestnetGenesisBlock.hash => "84'/1'"
case Block.RegtestGenesisBlock.hash | Block.TestnetGenesisBlock.hash | Block.SignetGenesisBlock.hash => "84'/1'"
case Block.LivenetGenesisBlock.hash => "84'/0'"
case _ => throw new IllegalArgumentException(s"invalid chain hash ${chainHash}")
}
Expand All @@ -41,7 +41,7 @@ class LocalOnchainKeyManager(entropy: ByteVector, chainHash: ByteVector32, passp

override def getOnchainMasterPubKey(account: Long): String = {
val prefix = chainHash match {
case Block.RegtestGenesisBlock.hash | Block.TestnetGenesisBlock.hash => vpub
case Block.RegtestGenesisBlock.hash | Block.TestnetGenesisBlock.hash | Block.SignetGenesisBlock.hash => vpub
case Block.LivenetGenesisBlock.hash => zpub
case _ => throw new IllegalArgumentException(s"invalid chain hash ${chainHash}")
}
Expand Down

0 comments on commit f69ec92

Please sign in to comment.