From e6b77cb38d9be691b079eedc7113d59ccf350565 Mon Sep 17 00:00:00 2001 From: Alex Forshtat Date: Mon, 12 Aug 2024 17:32:15 +0200 Subject: [PATCH] Reorder lines to have err check immediately after expression --- core/state_processor_rip7560.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/state_processor_rip7560.go b/core/state_processor_rip7560.go index 2de7101a08..74b5c8c402 100644 --- a/core/state_processor_rip7560.go +++ b/core/state_processor_rip7560.go @@ -229,13 +229,14 @@ func ApplyRip7560ValidationPhases(chainConfig *params.ChainConfig, bc ChainConte return nil, resultAccountValidation.Err } aad, err := validateAccountEntryPointCall(epc) + if err != nil { + return nil, err + } + // clear the EntryPoint calls array after parsing epc.err = nil epc.Input = nil - if err != nil { - return nil, err - } err = validateValidityTimeRange(header.Time, aad.ValidAfter.Uint64(), aad.ValidUntil.Uint64()) if err != nil { return nil, err