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 May 29, 2023
1 parent a78c78c commit 8f41149
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 @@ -244,6 +244,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 8f41149

Please sign in to comment.