Implement the outputBootstrapNodes option (taken from the interop branch)

This commit is contained in:
Zahary Karadjov 2019-09-27 19:05:17 +03:00
parent b56c96a4fd
commit 2bbe2cb23c
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
1 changed files with 9 additions and 0 deletions

View File

@ -912,6 +912,15 @@ when isMainModule:
Json.saveFile(config.outputNetworkMetadata.string, testnetMetadata, pretty = true)
echo "Wrote ", config.outputNetworkMetadata.string
let bootstrapFile = config.outputBootstrapNodes.string
if bootstrapFile.len > 0:
let bootstrapAddrLine = when networkBackend == libp2pBackend:
$bootstrapAddress.addresses[0] & "/p2p/" & bootstrapAddress.peer.pretty
else:
$bootstrapAddress
writeFile(bootstrapFile, bootstrapAddrLine)
echo "Wrote ", bootstrapFile
of updateTestnet:
discard waitFor updateTestnetMetadata(config)