bitcoind: add regtest support

Remove unsupported option 'testnet'.
This commit is contained in:
Erik Arvstedt 2020-10-16 17:42:57 +02:00
parent 6a16f60fe9
commit 9e928e2097
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
1 changed files with 14 additions and 3 deletions

View File

@ -11,7 +11,10 @@ let
# We're already logging via journald
nodebuglogfile=1
${optionalString cfg.testnet "testnet=1"}
${optionalString cfg.regtest ''
regtest=1
[regtest]
''}
${optionalString (cfg.dbCache != null) "dbcache=${toString cfg.dbCache}"}
prune=${toString cfg.prune}
${optionalString (cfg.sysperms != null) "sysperms=${if cfg.sysperms then "1" else "0"}"}
@ -159,10 +162,18 @@ in {
Allow JSON-RPC connections from specified source.
'';
};
testnet = mkOption {
regtest = mkOption {
type = types.bool;
default = false;
description = "Whether to use the test chain.";
description = "Enable regtest mode.";
};
network = mkOption {
readOnly = true;
default = if cfg.regtest then "regtest" else "mainnet";
};
makeNetworkName = mkOption {
readOnly = true;
default = mainnet: regtest: if cfg.regtest then regtest else mainnet;
};
port = mkOption {
type = types.nullOr types.port;