Hotfix: use the mainnet bootstrap nodes without specifying --network=mainnet explicitly

This commit is contained in:
Zahary Karadjov 2020-12-01 10:44:30 +02:00
parent 4328576e18
commit 3bdda3dd46
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
1 changed files with 12 additions and 10 deletions

View File

@ -1200,8 +1200,7 @@ programMain:
config.runtimePreset = metadata.runtimePreset
if config.cmd == noCommand:
for node in metadata.bootstrapNodes:
config.bootstrapNodes.add node
config.bootstrapNodes.add metadata.bootstrapNodes
if metadata.genesisData.len > 0:
genesisStateContents = newClone metadata.genesisData
@ -1223,18 +1222,21 @@ programMain:
checkForIncompatibleOption "deposit-contract-block", depositContractDeployedAt
config.depositContractAddress = some metadata.depositContractAddress
config.depositContractDeployedAt = some metadata.depositContractDeployedAt
eth1Network = metadata.eth1Network
else:
config.runtimePreset = defaultRuntimePreset
when const_preset == "mainnet":
if config.depositContractAddress.isNone:
# TODO Remove the ability to override the depositContractAddress
# on the command line in favour of always requiring a custom
# nework file. We have to do this, because any user setting
# would conflict with the default choice of 'mainnet' as a
# --network value.
config.depositContractAddress =
some mainnetMetadata.depositContractAddress
if config.depositContractDeployedAt.isNone:
config.depositContractDeployedAt =
some mainnetMetadata.depositContractDeployedAt
config.bootstrapNodes.add mainnetMetadata.bootstrapNodes
genesisStateContents = newClone mainnetMetadata.genesisData
genesisDepositsSnapshotContents = newClone mainnetMetadata.genesisDepositsSnapshot
eth1Network = some mainnet