Skip to content

Commit

Permalink
only send JWT headers in Bellatrix-capable networks (#3645)
Browse files Browse the repository at this point in the history
  • Loading branch information
tersec authored May 19, 2022
1 parent a359dbe commit 50e8415
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion beacon_chain/nimbus_beacon_node.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -414,6 +414,8 @@ proc init*(T: type BeaconNode,
quit 1

some jwtSecret.get
else:
none(seq[byte])

template getDepositContractSnapshot: auto =
if depositContractSnapshot.isSome:
Expand Down

0 comments on commit 50e8415

Please sign in to comment.