aboutsummaryrefslogtreecommitdiffstats
path: root/mobile/geth.go
diff options
context:
space:
mode:
Diffstat (limited to 'mobile/geth.go')
-rw-r--r--mobile/geth.go26
1 files changed, 15 insertions, 11 deletions
diff --git a/mobile/geth.go b/mobile/geth.go
index 85ac7fec5..4d1f48ec3 100644
--- a/mobile/geth.go
+++ b/mobile/geth.go
@@ -78,11 +78,11 @@ type NodeConfig struct {
// defaultNodeConfig contains the default node configuration values to use if all
// or some fields are missing from the user's specified list.
var defaultNodeConfig = &NodeConfig{
- BootstrapNodes: MainnetBootnodes(),
+ BootstrapNodes: FoundationBootnodes(),
MaxPeers: 25,
EthereumEnabled: true,
EthereumNetworkID: 1,
- EthereumChainConfig: MainnetChainConfig,
+ EthereumChainConfig: MainnetChainConfig(),
EthereumDatabaseCache: 16,
}
@@ -106,17 +106,21 @@ func NewNode(datadir string, config *NodeConfig) (*Node, error) {
if config.MaxPeers == 0 {
config.MaxPeers = defaultNodeConfig.MaxPeers
}
+ if config.BootstrapNodes == nil || config.BootstrapNodes.Size() == 0 {
+ config.BootstrapNodes = defaultNodeConfig.BootstrapNodes
+ }
// Create the empty networking stack
nodeConf := &node.Config{
- Name: clientIdentifier,
- DataDir: datadir,
- KeyStoreDir: filepath.Join(datadir, "keystore"), // Mobile should never use internal keystores!
- NoDiscovery: true,
- DiscoveryV5: true,
- BootstrapNodes: config.BootstrapNodes.nodes,
- ListenAddr: ":0",
- NAT: nat.Any(),
- MaxPeers: config.MaxPeers,
+ Name: clientIdentifier,
+ DataDir: datadir,
+ KeyStoreDir: filepath.Join(datadir, "keystore"), // Mobile should never use internal keystores!
+ NoDiscovery: true,
+ DiscoveryV5: true,
+ DiscoveryV5Addr: ":0",
+ BootstrapNodesV5: config.BootstrapNodes.nodes,
+ ListenAddr: ":0",
+ NAT: nat.Any(),
+ MaxPeers: config.MaxPeers,
}
stack, err := node.New(nodeConf)
if err != nil {