From 80d7dbb6cd8aeb77f98d89907be6643d7839d94d Mon Sep 17 00:00:00 2001 From: Edward Evans Date: Mon, 11 May 2020 16:19:48 +1000 Subject: [PATCH] Add option to configure max-peers Signed-off-by: Edward Evans --- README.md | 1 + templates/config.toml.j2 | 3 +++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index f68668e..2d4ef4e 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ All variables which can be overridden are stored in [defaults/main.yml](defaults | `besu_identity` | ___unset___ | Configuration of Identity in the Client ID | | `besu_host_ip` | "" | The host IP that Besu uses for the P2P network. This specifies the host on which P2P listens | | `besu_default_ip` | "{{ default(ansible_host) \| default('127.0.0.1') }}" | The fallback default for `besu_host_ip` | +| `besu_max_peers` | ___unset___ | The maximum number of P2P connections you can establish | | `besu_network` | mainnet | The network that this node will join. Other values are 'ropsten', 'rinkeby', 'goerli', 'dev' and 'custom' | | `besu_genesis_path` | ___unset___ | The path to the genesis file, only valid when `besu_network` is `custom` | | `besu_sync_mode` | FAST | Specifies the synchronization mode. Other values are 'FULL' | diff --git a/templates/config.toml.j2 b/templates/config.toml.j2 index e39e144..901965b 100644 --- a/templates/config.toml.j2 +++ b/templates/config.toml.j2 @@ -60,6 +60,9 @@ graphql-http-cors-origins=[{{besu_graphql_http_cors_origins|map('to_json')|join( p2p-host="{{besu_host_ip}}" {% endif %} p2p-port={{besu_p2p_port}} +{% if besu_max_peers is defined %} +max_peers={{besu_max_peers}} +{% endif %} # metrics metrics-enabled=true