Skip to content

Commit

Permalink
eth/tracer: rename to revertReason (#26574)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjl493456442 authored Jan 31, 2023
1 parent 78d089b commit efbd508
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 51 deletions.
22 changes: 11 additions & 11 deletions eth/tracers/internal/tracetest/calltrace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@ type callLog struct {

// callTrace is the result of a callTracer run.
type callTrace struct {
From common.Address `json:"from"`
Gas *hexutil.Uint64 `json:"gas"`
GasUsed *hexutil.Uint64 `json:"gasUsed"`
To common.Address `json:"to,omitempty"`
Input hexutil.Bytes `json:"input"`
Output hexutil.Bytes `json:"output,omitempty"`
Error string `json:"error,omitempty"`
Revertal string `json:"revertReason,omitempty"`
Calls []callTrace `json:"calls,omitempty"`
Logs []callLog `json:"logs,omitempty"`
Value *hexutil.Big `json:"value,omitempty"`
From common.Address `json:"from"`
Gas *hexutil.Uint64 `json:"gas"`
GasUsed *hexutil.Uint64 `json:"gasUsed"`
To common.Address `json:"to,omitempty"`
Input hexutil.Bytes `json:"input"`
Output hexutil.Bytes `json:"output,omitempty"`
Error string `json:"error,omitempty"`
RevertReason string `json:"revertReason,omitempty"`
Calls []callTrace `json:"calls,omitempty"`
Logs []callLog `json:"logs,omitempty"`
Value *hexutil.Big `json:"value,omitempty"`
// Gencodec adds overridden fields at the end
Type string `json:"type"`
}
Expand Down
24 changes: 12 additions & 12 deletions eth/tracers/native/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ type callLog struct {
}

type callFrame struct {
Type vm.OpCode `json:"-"`
From common.Address `json:"from"`
Gas uint64 `json:"gas"`
GasUsed uint64 `json:"gasUsed"`
To common.Address `json:"to,omitempty" rlp:"optional"`
Input []byte `json:"input" rlp:"optional"`
Output []byte `json:"output,omitempty" rlp:"optional"`
Error string `json:"error,omitempty" rlp:"optional"`
Revertal string `json:"revertReason,omitempty"`
Calls []callFrame `json:"calls,omitempty" rlp:"optional"`
Logs []callLog `json:"logs,omitempty" rlp:"optional"`
Type vm.OpCode `json:"-"`
From common.Address `json:"from"`
Gas uint64 `json:"gas"`
GasUsed uint64 `json:"gasUsed"`
To common.Address `json:"to,omitempty" rlp:"optional"`
Input []byte `json:"input" rlp:"optional"`
Output []byte `json:"output,omitempty" rlp:"optional"`
Error string `json:"error,omitempty" rlp:"optional"`
RevertReason string `json:"revertReason,omitempty"`
Calls []callFrame `json:"calls,omitempty" rlp:"optional"`
Logs []callLog `json:"logs,omitempty" rlp:"optional"`
// Placed at end on purpose. The RLP will be decoded to 0 instead of
// nil if there are non-empty elements after in the struct.
Value *big.Int `json:"value,omitempty" rlp:"optional"`
Expand Down Expand Up @@ -84,7 +84,7 @@ func (f *callFrame) processOutput(output []byte, err error) {
return
}
if unpacked, err := abi.UnpackRevert(output); err == nil {
f.Revertal = unpacked
f.RevertReason = unpacked
}
}

Expand Down
56 changes: 28 additions & 28 deletions eth/tracers/native/gen_callframe_json.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit efbd508

Please sign in to comment.