From ff27bb074851072a44c95c513bc5f7860b026838 Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Sun, 5 Oct 2025 22:21:57 +0800 Subject: [PATCH] fix most of the failing 7702 tests with note about how to properly fix this in the tracer hook calling code --- core/block_access_list_creation.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/block_access_list_creation.go b/core/block_access_list_creation.go index c84c0754b3..1c2725b0aa 100644 --- a/core/block_access_list_creation.go +++ b/core/block_access_list_creation.go @@ -107,7 +107,11 @@ func (a *BlockAccessListTracer) OnExit(depth int, output []byte, gasUsed uint64, } func (a *BlockAccessListTracer) OnCodeChange(addr common.Address, prevCodeHash common.Hash, prevCode []byte, codeHash common.Hash, code []byte, reason tracing.CodeChangeReason) { - a.accessListBuilder.CodeChange(addr, prevCode, code) + // TODO: if we don't have this equality check, some tests fail. should be investigated. + // probably the tracer shouldn't invoke code change if the code didn't actually change tho. + if prevCodeHash != codeHash { + a.accessListBuilder.CodeChange(addr, prevCode, code) + } } func (a *BlockAccessListTracer) OnSelfDestruct(addr common.Address) {