added the attestation bitfield to the bootstrap enr
This commit is contained in:
parent
be89a3c54d
commit
f3d0ae35f6
|
@ -1375,13 +1375,15 @@ when isMainModule:
|
||||||
if bootstrapFile.len > 0:
|
if bootstrapFile.len > 0:
|
||||||
let
|
let
|
||||||
networkKeys = getPersistentNetKeys(config)
|
networkKeys = getPersistentNetKeys(config)
|
||||||
|
metadata = getPersistentNetMetadata(config)
|
||||||
bootstrapEnr = enr.Record.init(
|
bootstrapEnr = enr.Record.init(
|
||||||
1, # sequence number
|
1, # sequence number
|
||||||
networkKeys.seckey.asEthKey,
|
networkKeys.seckey.asEthKey,
|
||||||
some(config.bootstrapAddress),
|
some(config.bootstrapAddress),
|
||||||
config.bootstrapPort,
|
config.bootstrapPort,
|
||||||
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)
|
writeFile(bootstrapFile, bootstrapEnr.toURI)
|
||||||
echo "Wrote ", bootstrapFile
|
echo "Wrote ", bootstrapFile
|
||||||
|
|
Loading…
Reference in New Issue