added the attestation bitfield to the bootstrap enr

This commit is contained in:
Viktor Kirilov 2020-04-22 16:12:18 +03:00 committed by zah
parent be89a3c54d
commit f3d0ae35f6
1 changed files with 3 additions and 1 deletions

View File

@ -1375,13 +1375,15 @@ when isMainModule:
if bootstrapFile.len > 0:
let
networkKeys = getPersistentNetKeys(config)
metadata = getPersistentNetMetadata(config)
bootstrapEnr = enr.Record.init(
1, # sequence number
networkKeys.seckey.asEthKey,
some(config.bootstrapAddress),
config.bootstrapPort,
config.bootstrapPort,
[toFieldPair("eth2", SSZ.encode(enrForkIdFromState initialState))])
[toFieldPair("eth2", SSZ.encode(enrForkIdFromState initialState)),
toFieldPair("attnets", SSZ.encode(metadata.attnets))])
writeFile(bootstrapFile, bootstrapEnr.toURI)
echo "Wrote ", bootstrapFile