Support new named networks correctly (#34)

Currently if the besu_network isn't one of the hard coded options, the value is ignored and a path to a custom genesis file is used. For the kiln network this results in the role failing because kiln is a built-in network and so besu_genesis_path is undefined.  This switches the logic to use the specified network, regardless of its value unless besu_genesis_path is specified so that new named networks are automatically supported but users can still specify their own genesis file.
pull/35/head 0.3.7
Adrian Sutton 3 years ago committed by GitHub
parent 0fdd3bc3be
commit 3d59448619
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      templates/config.toml.j2

@ -16,11 +16,12 @@ required-blocks=[{{besu_required_blocks|map('to_json')|join(',')}}]
target-gas-limit="{{ besu_target_gas_limit }}"
{% endif %}
{% if besu_network.lower() in ["mainnet", "rinkeby", "goerli", "ropsten", "classic", "mordor", "kotti", "dev"] %}
network="{{besu_network}}"
{% else %}
{% if besu_genesis_path is defined and besu_genesis_path != "" %}
genesis-file="{{ besu_genesis_path }}"
{% else %}
network="{{besu_network}}"
{% endif %}
min-gas-price={{ besu_min_gas }}
sync-mode="{{besu_sync_mode}}"
host-whitelist=[{{besu_host_whitelist|map('to_json')|join(',')}}]

Loading…
Cancel
Save