From 6dae9f747cb93f02ea3b56b135f0fe583c6c3503 Mon Sep 17 00:00:00 2001 From: yperbasis Date: Thu, 28 Jul 2022 17:22:01 +0200 Subject: [PATCH] No TTD mismatch if there's no TTD in chainConfig yet --- cmd/rpcdaemon22/commands/engine_api.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cmd/rpcdaemon22/commands/engine_api.go b/cmd/rpcdaemon22/commands/engine_api.go index 4c2aa76ef35..d63d99102e9 100644 --- a/cmd/rpcdaemon22/commands/engine_api.go +++ b/cmd/rpcdaemon22/commands/engine_api.go @@ -223,12 +223,7 @@ func (e *EngineImpl) ExchangeTransitionConfigurationV1(ctx context.Context, beac } terminalTotalDifficulty := chainConfig.TerminalTotalDifficulty - - if terminalTotalDifficulty == nil { - return TransitionConfiguration{}, fmt.Errorf("the execution layer doesn't have a terminal total difficulty. expected: %v", beaconConfig.TerminalTotalDifficulty) - } - - if terminalTotalDifficulty.Cmp((*big.Int)(beaconConfig.TerminalTotalDifficulty)) != 0 { + if terminalTotalDifficulty != nil && terminalTotalDifficulty.Cmp((*big.Int)(beaconConfig.TerminalTotalDifficulty)) != 0 { return TransitionConfiguration{}, fmt.Errorf("the execution layer has a wrong terminal total difficulty. expected %v, but instead got: %d", beaconConfig.TerminalTotalDifficulty, terminalTotalDifficulty) }