fix most of the failing 7702 tests with note about how to properly fix this in the tracer hook calling code

This commit is contained in:
Jared Wasinger 2025-10-05 22:21:57 +08:00
parent 98451ebec9
commit ff27bb0748

View file

@ -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) { func (a *BlockAccessListTracer) OnCodeChange(addr common.Address, prevCodeHash common.Hash, prevCode []byte, codeHash common.Hash, code []byte, reason tracing.CodeChangeReason) {
// 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) a.accessListBuilder.CodeChange(addr, prevCode, code)
}
} }
func (a *BlockAccessListTracer) OnSelfDestruct(addr common.Address) { func (a *BlockAccessListTracer) OnSelfDestruct(addr common.Address) {