internal/ethapi: skip transfer capture for callcode in log tracer (#35248)

This commit is contained in:
cui 2026-07-01 15:40:01 +08:00 committed by GitHub
parent dd672c6867
commit 769c8c52c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -80,7 +80,7 @@ func (t *tracer) Hooks() *tracing.Hooks {
func (t *tracer) onEnter(depth int, typ byte, from common.Address, to common.Address, input []byte, gas uint64, value *big.Int) {
t.logs = append(t.logs, make([]*types.Log, 0))
if vm.OpCode(typ) != vm.DELEGATECALL && value != nil && value.Cmp(common.Big0) > 0 {
if vm.OpCode(typ) != vm.DELEGATECALL && vm.OpCode(typ) != vm.CALLCODE && value != nil && value.Cmp(common.Big0) > 0 {
t.captureTransfer(from, to, value)
}
}