Skip to content

Commit baf38c3

Browse files
terseczah
authored andcommitted
use JWT when and only when the user specifies a JWT secret explicitly (#3786)
1 parent 3514d39 commit baf38c3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

beacon_chain/nimbus_beacon_node.nim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,9 @@ proc init*(T: type BeaconNode,
435435
quit 1
436436

437437
let optJwtSecret =
438-
if cfg.BELLATRIX_FORK_EPOCH != FAR_FUTURE_EPOCH:
438+
# Some Web3 endpoints aren't compatible with JWT, but if explicitly chosen,
439+
# use it regardless.
440+
if config.jwtSecret.isSome:
439441
let jwtSecret = rng[].checkJwtSecret(
440442
string(config.dataDir), config.jwtSecret)
441443
if jwtSecret.isErr:

0 commit comments

Comments
 (0)