From d2f59ebab97a16fcdb8b3fdcbb6758c0abb154b5 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Tue, 11 Feb 2020 18:58:29 +0200 Subject: [PATCH] Switch to ENR records in the bootstrap_nodes.txt file --- beacon_chain/beacon_node.nim | 13 +++++++------ vendor/nim-eth | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/beacon_chain/beacon_node.nim b/beacon_chain/beacon_node.nim index d4361b84a..f962b10c1 100644 --- a/beacon_chain/beacon_node.nim +++ b/beacon_chain/beacon_node.nim @@ -1096,14 +1096,15 @@ when isMainModule: SSZ.saveFile(outSszGenesis, initialState) echo "Wrote ", outSszGenesis - var - bootstrapAddress = getPersistenBootstrapAddr( - config, parseIpAddress(config.bootstrapAddress), Port config.bootstrapPort) - let bootstrapFile = config.outputBootstrapFile.string if bootstrapFile.len > 0: - let bootstrapAddrLine = $bootstrapAddress - writeFile(bootstrapFile, bootstrapAddrLine) + let + networkKeys = getPersistentNetKeys(config) + bootstrapAddress = enode.Address( + ip: parseIpAddress(config.bootstrapAddress), + udpPort: Port config.bootstrapPort) + bootstrapEnr = enr.Record.init(1, networkKeys.seckey, bootstrapAddress) + writeFile(bootstrapFile, bootstrapEnr.toURI) echo "Wrote ", bootstrapFile of importValidator: diff --git a/vendor/nim-eth b/vendor/nim-eth index 9b40b6628..019df303b 160000 --- a/vendor/nim-eth +++ b/vendor/nim-eth @@ -1 +1 @@ -Subproject commit 9b40b662872274975f22fd20dab321fd434017c6 +Subproject commit 019df303b437f082e01a173a280ee3c5dc10844d