bitcoind: simplify pruning
Remove the possible null value for bitcoind.prune and set prune = 0 in bitcoind as a default. Remove prune = 0 in secure-node.nix and the mkForce in configuration.nix (bitcoind.prune = lib.mkForce ).
This commit is contained in:
parent
b9a7a71873
commit
0fd99c4cc0
@ -27,8 +27,7 @@
|
||||
# clightning is compatible with pruning. See
|
||||
# https://github.com/ElementsProject/lightning/#pruning for more information.
|
||||
# LND and electrs are not compatible with pruning.
|
||||
# Note: You can override default settings from secure-node.nix as follows
|
||||
# services.bitcoind.prune = lib.mkForce 100000;
|
||||
# services.bitcoind.prune = 100000;
|
||||
#
|
||||
# You can add options that are not defined in modules/bitcoind.nix as follows
|
||||
# services.bitcoind.extraConfig = ''
|
||||
|
@ -12,7 +12,7 @@ let
|
||||
|
||||
${optionalString cfg.testnet "testnet=1"}
|
||||
${optionalString (cfg.dbCache != null) "dbcache=${toString cfg.dbCache}"}
|
||||
${optionalString (cfg.prune != null) "prune=${toString cfg.prune}"}
|
||||
"prune=${toString cfg.prune}
|
||||
${optionalString (cfg.sysperms != null) "sysperms=${if cfg.sysperms then "1" else "0"}"}
|
||||
${optionalString (cfg.disablewallet != null) "disablewallet=${if cfg.disablewallet then "1" else "0"}"}
|
||||
${optionalString (cfg.assumevalid != null) "assumevalid=${cfg.assumevalid}"}
|
||||
@ -179,12 +179,8 @@ in {
|
||||
description = "Override the default database cache size in megabytes.";
|
||||
};
|
||||
prune = mkOption {
|
||||
type = types.nullOr (types.coercedTo
|
||||
(types.enum [ "disable" "manual" ])
|
||||
(x: if x == "disable" then 0 else 1)
|
||||
types.ints.unsigned
|
||||
);
|
||||
default = null;
|
||||
type = types.ints.unsigned;
|
||||
default = 0;
|
||||
example = 10000;
|
||||
description = ''
|
||||
Reduce storage requirements by enabling pruning (deleting) of old
|
||||
|
@ -64,7 +64,6 @@ in {
|
||||
addnodes = [ "ecoc5q34tmbq54wl.onion" ];
|
||||
discover = false;
|
||||
addresstype = "bech32";
|
||||
prune = 0;
|
||||
dbCache = 1000;
|
||||
};
|
||||
services.tor.hiddenServices.bitcoind = mkHiddenService { port = cfg.bitcoind.port; };
|
||||
|
Loading…
Reference in New Issue
Block a user