use --networkid flag to pick network, use mainnet by default

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-06-08 15:50:18 +02:00
parent d0bd08decc
commit 919802a3e2
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 17 additions and 9 deletions

View File

@ -73,8 +73,18 @@ geth_lov_level_names:
detail: 5
geth_log_level_name: 'info'
geth_log_level_id: '{{ geth_lov_level_names[geth_log_level_name | lower] | mandatory }}'
# Available: ropsten/testnet, rinkeby, goerli
geth_network_name: 'ropsten'
# Mapping of network names to IDs for --networkid flag
geth_network_ids:
frontier: 1
mainnet: 1
ropsten: 3
testnet: 3
rinkeby: 4
goerli: 5
# Available: frontier/mainnet, ropsten/testnet, rinkeby, goerli
geth_network_name: 'mainnet'
geth_network_id: '{{ geth_network_ids[geth_network_name] }}'
# Port to listen on
geth_port: 30303

View File

@ -16,14 +16,12 @@
- '{{ geth_port }}:{{ geth_port }}/tcp'
- '{{ geth_port }}:{{ geth_port }}/udp'
- '{{ geth_rpc_addr }}:{{ geth_rpc_port }}:{{ geth_rpc_port }}'
labels:
# These are just for documentation
org.ethereum.geth.network_name: '{{ geth_network_name }}'
org.ethereum.geth.network_id: '{{ geth_network_id }}'
command: |
{% if geth_network_name in ("ropsten", "testnet") %}
--testnet
{% elif geth_network_name == "rinkeby" %}
--rinkeby
{% elif geth_network_name == "goerli" %}
--goerli
{% endif %}
--networkid={{ geth_network_id }}
{% if geth_v5disc_enabled %}
--v5disc
{% endif %}