1
0
Fork 0
mirror of https://github.com/ACINQ/eclair.git synced 2025-02-22 06:21:42 +01:00

Remove restriction to regtest/testnet (#2652)

Now that the model is stable we can remove restrictions.
This commit is contained in:
Pierre-Marie Padiou 2023-05-10 10:34:25 +02:00 committed by GitHub
parent 77b333731f
commit 7bf2e8c67f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 7 deletions

View file

@ -98,11 +98,6 @@ class Setup(val datadir: File,
val Seeds(nodeSeed, channelSeed) = seeds_opt.getOrElse(NodeParams.getSeeds(datadir))
val chain = config.getString("chain")
if (chain != "regtest" && chain != "testnet") {
// TODO: database format is WIP, we want to be able to squash changes and not support intermediate unreleased versions
throw new RuntimeException("this unreleased version of Eclair only works on regtest")
}
val chaindir = new File(datadir, chain)
chaindir.mkdirs()
val nodeKeyManager = new LocalNodeKeyManager(nodeSeed, NodeParams.hashFromChain(chain))

View file

@ -824,8 +824,7 @@ class Channel(val nodeParams: NodeParams, val wallet: OnChainChannelFunder with
stay()
}
// NB: we only accept splices on regtest and testnet
case Event(msg: SpliceInit, d: DATA_NORMAL) if nodeParams.chainHash == Block.RegtestGenesisBlock.hash || nodeParams.chainHash == Block.TestnetGenesisBlock.hash =>
case Event(msg: SpliceInit, d: DATA_NORMAL) =>
d.spliceStatus match {
case SpliceStatus.NoSplice =>
if (d.commitments.isIdle) {