From ed4d5b03a3ee9f104c0a3705966b6d3ef9d984f9 Mon Sep 17 00:00:00 2001 From: Mark Holt Date: Sun, 8 Dec 2024 12:18:22 +0000 Subject: [PATCH] fix 7702 delegation check --- core/state_transition.go | 2 +- tests/exec_spec_test.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/state_transition.go b/core/state_transition.go index feadff5e892..52141f37dbe 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -278,7 +278,7 @@ func (st *StateTransition) preCheck(gasBailout bool) error { if err != nil { return fmt.Errorf("%w: %w", ErrStateTransitionFailed, err) } - if ok { + if !ok { return fmt.Errorf("%w: address %v, codehash: %s", ErrSenderNoEOA, st.msg.From().Hex(), codeHash) } diff --git a/tests/exec_spec_test.go b/tests/exec_spec_test.go index e93e660f97b..04408000317 100644 --- a/tests/exec_spec_test.go +++ b/tests/exec_spec_test.go @@ -14,11 +14,12 @@ // You should have received a copy of the GNU Lesser General Public License // along with Erigon. If not, see . -//go:build integration +///go:build integration package tests import ( + "fmt" "path/filepath" "testing"