use the right preset in "make testnet{0,1}" [skip ci] (#932)

...and stop pretending to handle the preset in "connect_to_testnet.nims".
This commit is contained in:
Ștefan Talpalaru 2020-04-24 17:28:03 +02:00 committed by GitHub
parent fe30b24aba
commit 39a893ea90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 10 deletions

View File

@ -119,11 +119,11 @@ clean-testnet0:
clean-testnet1:
rm -rf build/data/testnet1
testnet0: | build deps
NIM_PARAMS="$(NIM_PARAMS)" LOG_LEVEL="$(LOG_LEVEL)" $(ENV_SCRIPT) nim $(NIM_PARAMS) scripts/connect_to_testnet.nims $(SCRIPT_PARAMS) testnet0
testnet1: | build deps
NIM_PARAMS="$(NIM_PARAMS)" LOG_LEVEL="$(LOG_LEVEL)" $(ENV_SCRIPT) nim $(NIM_PARAMS) scripts/connect_to_testnet.nims $(SCRIPT_PARAMS) testnet1
# - we're getting the preset from a testnet-specific .env file
# - try SCRIPT_PARAMS="--skipGoerliKey"
testnet0 testnet1: | build deps
source scripts/$@.env; \
NIM_PARAMS="$(NIM_PARAMS) -d:const_preset=$$CONST_PRESET" LOG_LEVEL="$(LOG_LEVEL)" $(ENV_SCRIPT) nim $(NIM_PARAMS) scripts/connect_to_testnet.nims $(SCRIPT_PARAMS) $@
clean: | clean-common
rm -rf build/{$(TOOLS_CSV),all_tests,*_node,*ssz*,beacon_node_testnet*,state_sim,transition*}

View File

@ -7,7 +7,6 @@ const
bootstrapYamlFileName = "boot_enr.yaml"
depositContractFileName = "deposit_contract.txt"
genesisFile = "genesis.ssz"
configFile = "config.yaml"
testnetsRepo = "eth2-testnets"
web3Url = "wss://goerli.infura.io/ws/v3/809a18497dd74102b5f37d25aae3c85a"
@ -68,9 +67,6 @@ cli do (skipGoerliKey {.
else:
echo "Warning: the network metadata doesn't include a bootstrap file"
var preset = testnetDir / configFile
if not system.fileExists(preset): preset = "minimal"
let
dataDirName = testnetName.replace("/", "_")
.replace("(", "_")
@ -100,7 +96,7 @@ cli do (skipGoerliKey {.
rmDir dataDir
cd rootDir
exec &"""nim c {nimFlags} -d:"const_preset={preset}" -o:"{beaconNodeBinary}" beacon_chain/beacon_node.nim"""
exec &"""nim c {nimFlags} -o:"{beaconNodeBinary}" beacon_chain/beacon_node.nim"""
mkDir dumpDir