mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
fix: lookup tx.to
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
27630a44d6
commit
f88288c7b0
1 changed files with 8 additions and 1 deletions
|
|
@ -135,7 +135,7 @@ func (t *prestateTracer) OnOpcode(pc uint64, opcode byte, gas, cost uint64, scop
|
|||
case stackLen >= 5 && (op == vm.DELEGATECALL || op == vm.CALL || op == vm.STATICCALL || op == vm.CALLCODE):
|
||||
addr := common.Address(stackData[stackLen-2].Bytes20())
|
||||
t.lookupAccount(addr)
|
||||
// Lookup a delegation target
|
||||
// Lookup the delegation target
|
||||
if t.chainConfig.IsPrague(t.env.BlockNumber, t.env.Time) {
|
||||
code := t.env.StateDB.GetCode(addr)
|
||||
if target, ok := types.ParseDelegation(code); ok {
|
||||
|
|
@ -170,6 +170,13 @@ func (t *prestateTracer) OnTxStart(env *tracing.VMContext, tx *types.Transaction
|
|||
t.created[t.to] = true
|
||||
} else {
|
||||
t.to = *tx.To()
|
||||
// Lookup the delegation target
|
||||
if t.chainConfig.IsPrague(t.env.BlockNumber, t.env.Time) {
|
||||
code := t.env.StateDB.GetCode(t.to)
|
||||
if target, ok := types.ParseDelegation(code); ok {
|
||||
t.lookupAccount(target)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
t.lookupAccount(from)
|
||||
|
|
|
|||
Loading…
Reference in a new issue