bitcoind: add regtest support
Remove unsupported option 'testnet'.
This commit is contained in:
parent
6a16f60fe9
commit
9e928e2097
@ -11,7 +11,10 @@ let
|
|||||||
# We're already logging via journald
|
# We're already logging via journald
|
||||||
nodebuglogfile=1
|
nodebuglogfile=1
|
||||||
|
|
||||||
${optionalString cfg.testnet "testnet=1"}
|
${optionalString cfg.regtest ''
|
||||||
|
regtest=1
|
||||||
|
[regtest]
|
||||||
|
''}
|
||||||
${optionalString (cfg.dbCache != null) "dbcache=${toString cfg.dbCache}"}
|
${optionalString (cfg.dbCache != null) "dbcache=${toString cfg.dbCache}"}
|
||||||
prune=${toString cfg.prune}
|
prune=${toString cfg.prune}
|
||||||
${optionalString (cfg.sysperms != null) "sysperms=${if cfg.sysperms then "1" else "0"}"}
|
${optionalString (cfg.sysperms != null) "sysperms=${if cfg.sysperms then "1" else "0"}"}
|
||||||
@ -159,10 +162,18 @@ in {
|
|||||||
Allow JSON-RPC connections from specified source.
|
Allow JSON-RPC connections from specified source.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
testnet = mkOption {
|
regtest = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
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 {
|
port = mkOption {
|
||||||
type = types.nullOr types.port;
|
type = types.nullOr types.port;
|
||||||
|
Loading…
Reference in New Issue
Block a user