From 11948936a6984a313513cdc2284bd091359ecf62 Mon Sep 17 00:00:00 2001 From: q9f <58883403+q9f@users.noreply.github.com> Date: Wed, 1 Apr 2020 17:40:52 +0200 Subject: [PATCH] mobile: allow for configuring goerli and rinkeby nodes --- mobile/geth.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/mobile/geth.go b/mobile/geth.go index 41341fac47..27f1c4ed97 100644 --- a/mobile/geth.go +++ b/mobile/geth.go @@ -153,6 +153,20 @@ func NewNode(datadir string, config *NodeConfig) (stack *Node, _ error) { config.EthereumNetworkID = 3 } } + // If we have the Rinkeby testnet, hard code the chain configs too + if config.EthereumGenesis == RinkebyGenesis() { + genesis.Config = params.RinkebyChainConfig + if config.EthereumNetworkID == 1 { + config.EthereumNetworkID = 4 + } + } + // If we have the Goerli testnet, hard code the chain configs too + if config.EthereumGenesis == GoerliGenesis() { + genesis.Config = params.GoerliChainConfig + if config.EthereumNetworkID == 1 { + config.EthereumNetworkID = 5 + } + } } // Register the Ethereum protocol if requested if config.EthereumEnabled {