From 227171ce2bad5ad31cb0e9a6b761ac805c908608 Mon Sep 17 00:00:00 2001 From: Dustin Brody Date: Tue, 21 Jun 2022 20:30:31 +0000 Subject: [PATCH] use JWT when and only when the user specifies a JWT secret explicitly --- beacon_chain/nimbus_beacon_node.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/beacon_chain/nimbus_beacon_node.nim b/beacon_chain/nimbus_beacon_node.nim index a9a06cb173..2e150555f0 100644 --- a/beacon_chain/nimbus_beacon_node.nim +++ b/beacon_chain/nimbus_beacon_node.nim @@ -435,7 +435,9 @@ proc init*(T: type BeaconNode, quit 1 let optJwtSecret = - if cfg.BELLATRIX_FORK_EPOCH != FAR_FUTURE_EPOCH: + # Some Web3 endpoints aren't compatible with JWT, but if explicitly chosen, + # use it regardless. + if config.jwtSecret.isSome: let jwtSecret = rng[].checkJwtSecret( string(config.dataDir), config.jwtSecret) if jwtSecret.isErr: