From b24c14ec617d41cdf94e84ea40eca779dcd4f8d6 Mon Sep 17 00:00:00 2001 From: nixbitcoin Date: Tue, 13 Jul 2021 13:59:56 +0000 Subject: [PATCH] liquidd: make regtest capable --- modules/liquid.nix | 11 ++++------- test/tests.nix | 1 + 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/liquid.nix b/modules/liquid.nix index c05278a..215ef5f 100644 --- a/modules/liquid.nix +++ b/modules/liquid.nix @@ -9,8 +9,10 @@ let secretsDir = config.nix-bitcoin.secretsDir; pidFile = "${cfg.dataDir}/liquidd.pid"; configFile = pkgs.writeText "elements.conf" '' - chain=liquidv1 - ${optionalString cfg.testnet "testnet=1"} + chain=${config.services.bitcoind.makeNetworkName "liquidv1" '' + regtest + [regtest]'' # Add [regtest] config section + } ${optionalString (cfg.dbCache != null) "dbcache=${toString cfg.dbCache}"} ${optionalString (cfg.prune != null) "prune=${toString cfg.prune}"} ${optionalString (cfg.validatepegin != null) "validatepegin=${if cfg.validatepegin then "1" else "0"}"} @@ -140,11 +142,6 @@ in { default = "liquidrpc"; description = "Username for JSON-RPC connections"; }; - testnet = mkOption { - type = types.bool; - default = false; - description = "Whether to use the test chain."; - }; proxy = mkOption { type = types.nullOr types.str; default = if cfg.enforceTor then config.services.tor.client.socksListenAddress else null; diff --git a/test/tests.nix b/test/tests.nix index b501ad3..2cd6c84 100644 --- a/test/tests.nix +++ b/test/tests.nix @@ -183,6 +183,7 @@ let imports = [ scenarios.regtestBase ]; services.clightning.enable = true; test.features.clightningPlugins = true; + services.liquidd.enable = true; services.spark-wallet.enable = true; services.lnd.enable = true; services.lightning-loop.enable = true;