mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-20 11:46:44 +00:00
eth/tracers/native: add index to call log
This commit is contained in:
parent
add1890a57
commit
26efe7ddca
1 changed files with 2 additions and 0 deletions
|
|
@ -44,6 +44,7 @@ type callLog struct {
|
|||
Data hexutil.Bytes `json:"data"`
|
||||
// Position of the log relative to subcalls within the same trace
|
||||
// See https://github.com/ethereum/go-ethereum/pull/28389 for details
|
||||
Index hexutil.Uint `json:"index"`
|
||||
Position hexutil.Uint `json:"position"`
|
||||
}
|
||||
|
||||
|
|
@ -250,6 +251,7 @@ func (t *callTracer) OnLog(log *types.Log) {
|
|||
Address: log.Address,
|
||||
Topics: log.Topics,
|
||||
Data: log.Data,
|
||||
Index: hexutil.Uint(log.Index),
|
||||
Position: hexutil.Uint(len(t.callstack[len(t.callstack)-1].Calls)),
|
||||
}
|
||||
t.callstack[len(t.callstack)-1].Logs = append(t.callstack[len(t.callstack)-1].Logs, l)
|
||||
|
|
|
|||
Loading…
Reference in a new issue