From 59bcbb4f3337b78e25f3a1545d4fe6d6bc03a855 Mon Sep 17 00:00:00 2001 From: Andrew Ashikhmin <34320705+yperbasis@users.noreply.github.com> Date: Thu, 28 Jul 2022 18:25:01 +0200 Subject: [PATCH] No TTD mismatch if there's no TTD in chainConfig yet (#4852) --- 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) }