only send JWT headers in Bellatrix-capable networks (#3645)

This commit is contained in:
tersec 2022-05-19 20:36:47 +00:00 committed by GitHub
parent a359dbe23e
commit 50e84156cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -405,7 +405,7 @@ proc init*(T: type BeaconNode,
quit 1
let optJwtSecret =
block:
if cfg.BELLATRIX_FORK_EPOCH != FAR_FUTURE_EPOCH:
let jwtSecret = rng[].checkJwtSecret(
string(config.dataDir), config.jwtSecret)
if jwtSecret.isErr:
@ -414,6 +414,8 @@ proc init*(T: type BeaconNode,
quit 1
some jwtSecret.get
else:
none(seq[byte])
template getDepositContractSnapshot: auto =
if depositContractSnapshot.isSome: