Allow adding multiple nodes to bitcoind with the addnodes option and improve bitcoin module option descriptions

This commit is contained in:
Jonas Nick 2020-02-25 22:00:27 +00:00
parent ed6511c96e
commit 323b2a7f17
No known key found for this signature in database
GPG Key ID: 4861DBF262123605
2 changed files with 12 additions and 11 deletions

View File

@ -20,7 +20,7 @@ let
${optionalString (cfg.proxy != null) "proxy=${cfg.proxy}"} ${optionalString (cfg.proxy != null) "proxy=${cfg.proxy}"}
listen=${if cfg.listen then "1" else "0"} listen=${if cfg.listen then "1" else "0"}
${optionalString (cfg.discover != null) "discover=${if cfg.discover then "1" else "0"}"} ${optionalString (cfg.discover != null) "discover=${if cfg.discover then "1" else "0"}"}
${optionalString (cfg.addnode != null) "addnode=${cfg.addnode}"} ${lib.concatMapStrings (node: "addnode=${node}\n") cfg.addnodes}
# RPC server options # RPC server options
@ -221,20 +221,21 @@ in {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default = null;
example = "00000000000000000000e5abc3a74fe27dc0ead9c70ea1deb456f11c15fd7bc6"; example = "00000000000000000000e5abc3a74fe27dc0ead9c70ea1deb456f11c15fd7bc6";
description = "If this block is in the chain assume that it and its ancestors are valid and potentially skip their script verification"; description = ''
If this block is in the chain assume that it and its ancestors are
valid and potentially skip their script verification.
'';
}; };
addnode = mkOption { addnodes = mkOption {
type = types.nullOr types.str; type = types.listOf types.str;
default = null; default = [];
example = "ecoc5q34tmbq54wl.onion"; example = [ "ecoc5q34tmbq54wl.onion" ];
description = "Add a node to connect to and attempt to keep the connection open"; description = "Add nodes to connect to and attempt to keep the connections open";
}; };
discover = mkOption { discover = mkOption {
type = types.nullOr types.bool; type = types.nullOr types.bool;
default = null; default = null;
description = '' description = "Discover own IP addresses";
Discover own IP addresses
'';
}; };
addresstype = mkOption { addresstype = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;

View File

@ -58,7 +58,7 @@ in {
services.bitcoind.zmqpubrawblock = "tcp://127.0.0.1:28332"; services.bitcoind.zmqpubrawblock = "tcp://127.0.0.1:28332";
services.bitcoind.zmqpubrawtx = "tcp://127.0.0.1:28333"; services.bitcoind.zmqpubrawtx = "tcp://127.0.0.1:28333";
services.bitcoind.assumevalid = "00000000000000000000e5abc3a74fe27dc0ead9c70ea1deb456f11c15fd7bc6"; services.bitcoind.assumevalid = "00000000000000000000e5abc3a74fe27dc0ead9c70ea1deb456f11c15fd7bc6";
services.bitcoind.addnode = "ecoc5q34tmbq54wl.onion"; services.bitcoind.addnodes = [ "ecoc5q34tmbq54wl.onion" ];
services.bitcoind.discover = false; services.bitcoind.discover = false;
services.bitcoind.addresstype = "bech32"; services.bitcoind.addresstype = "bech32";
services.bitcoind.prune = 0; services.bitcoind.prune = 0;