liquidd: make regtest capable

This commit is contained in:
nixbitcoin 2021-07-13 13:59:56 +00:00
parent b7225f5d11
commit b24c14ec61
No known key found for this signature in database
GPG Key ID: B6044ECBA2DAE5D0
2 changed files with 5 additions and 7 deletions

View File

@ -9,8 +9,10 @@ let
secretsDir = config.nix-bitcoin.secretsDir; secretsDir = config.nix-bitcoin.secretsDir;
pidFile = "${cfg.dataDir}/liquidd.pid"; pidFile = "${cfg.dataDir}/liquidd.pid";
configFile = pkgs.writeText "elements.conf" '' configFile = pkgs.writeText "elements.conf" ''
chain=liquidv1 chain=${config.services.bitcoind.makeNetworkName "liquidv1" ''
${optionalString cfg.testnet "testnet=1"} regtest
[regtest]'' # Add [regtest] config section
}
${optionalString (cfg.dbCache != null) "dbcache=${toString cfg.dbCache}"} ${optionalString (cfg.dbCache != null) "dbcache=${toString cfg.dbCache}"}
${optionalString (cfg.prune != null) "prune=${toString cfg.prune}"} ${optionalString (cfg.prune != null) "prune=${toString cfg.prune}"}
${optionalString (cfg.validatepegin != null) "validatepegin=${if cfg.validatepegin then "1" else "0"}"} ${optionalString (cfg.validatepegin != null) "validatepegin=${if cfg.validatepegin then "1" else "0"}"}
@ -140,11 +142,6 @@ in {
default = "liquidrpc"; default = "liquidrpc";
description = "Username for JSON-RPC connections"; description = "Username for JSON-RPC connections";
}; };
testnet = mkOption {
type = types.bool;
default = false;
description = "Whether to use the test chain.";
};
proxy = mkOption { proxy = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = if cfg.enforceTor then config.services.tor.client.socksListenAddress else null; default = if cfg.enforceTor then config.services.tor.client.socksListenAddress else null;

View File

@ -183,6 +183,7 @@ let
imports = [ scenarios.regtestBase ]; imports = [ scenarios.regtestBase ];
services.clightning.enable = true; services.clightning.enable = true;
test.features.clightningPlugins = true; test.features.clightningPlugins = true;
services.liquidd.enable = true;
services.spark-wallet.enable = true; services.spark-wallet.enable = true;
services.lnd.enable = true; services.lnd.enable = true;
services.lightning-loop.enable = true; services.lightning-loop.enable = true;