Skip to content

Commit efbd508

Browse files
authored
eth/tracer: rename to revertReason (#26574)
1 parent 78d089b commit efbd508

File tree

3 files changed

+51
-51
lines changed

3 files changed

+51
-51
lines changed

eth/tracers/internal/tracetest/calltrace_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ type callLog struct {
5555

5656
// callTrace is the result of a callTracer run.
5757
type callTrace struct {
58-
From common.Address `json:"from"`
59-
Gas *hexutil.Uint64 `json:"gas"`
60-
GasUsed *hexutil.Uint64 `json:"gasUsed"`
61-
To common.Address `json:"to,omitempty"`
62-
Input hexutil.Bytes `json:"input"`
63-
Output hexutil.Bytes `json:"output,omitempty"`
64-
Error string `json:"error,omitempty"`
65-
Revertal string `json:"revertReason,omitempty"`
66-
Calls []callTrace `json:"calls,omitempty"`
67-
Logs []callLog `json:"logs,omitempty"`
68-
Value *hexutil.Big `json:"value,omitempty"`
58+
From common.Address `json:"from"`
59+
Gas *hexutil.Uint64 `json:"gas"`
60+
GasUsed *hexutil.Uint64 `json:"gasUsed"`
61+
To common.Address `json:"to,omitempty"`
62+
Input hexutil.Bytes `json:"input"`
63+
Output hexutil.Bytes `json:"output,omitempty"`
64+
Error string `json:"error,omitempty"`
65+
RevertReason string `json:"revertReason,omitempty"`
66+
Calls []callTrace `json:"calls,omitempty"`
67+
Logs []callLog `json:"logs,omitempty"`
68+
Value *hexutil.Big `json:"value,omitempty"`
6969
// Gencodec adds overridden fields at the end
7070
Type string `json:"type"`
7171
}

eth/tracers/native/call.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ type callLog struct {
4242
}
4343

4444
type callFrame struct {
45-
Type vm.OpCode `json:"-"`
46-
From common.Address `json:"from"`
47-
Gas uint64 `json:"gas"`
48-
GasUsed uint64 `json:"gasUsed"`
49-
To common.Address `json:"to,omitempty" rlp:"optional"`
50-
Input []byte `json:"input" rlp:"optional"`
51-
Output []byte `json:"output,omitempty" rlp:"optional"`
52-
Error string `json:"error,omitempty" rlp:"optional"`
53-
Revertal string `json:"revertReason,omitempty"`
54-
Calls []callFrame `json:"calls,omitempty" rlp:"optional"`
55-
Logs []callLog `json:"logs,omitempty" rlp:"optional"`
45+
Type vm.OpCode `json:"-"`
46+
From common.Address `json:"from"`
47+
Gas uint64 `json:"gas"`
48+
GasUsed uint64 `json:"gasUsed"`
49+
To common.Address `json:"to,omitempty" rlp:"optional"`
50+
Input []byte `json:"input" rlp:"optional"`
51+
Output []byte `json:"output,omitempty" rlp:"optional"`
52+
Error string `json:"error,omitempty" rlp:"optional"`
53+
RevertReason string `json:"revertReason,omitempty"`
54+
Calls []callFrame `json:"calls,omitempty" rlp:"optional"`
55+
Logs []callLog `json:"logs,omitempty" rlp:"optional"`
5656
// Placed at end on purpose. The RLP will be decoded to 0 instead of
5757
// nil if there are non-empty elements after in the struct.
5858
Value *big.Int `json:"value,omitempty" rlp:"optional"`
@@ -84,7 +84,7 @@ func (f *callFrame) processOutput(output []byte, err error) {
8484
return
8585
}
8686
if unpacked, err := abi.UnpackRevert(output); err == nil {
87-
f.Revertal = unpacked
87+
f.RevertReason = unpacked
8888
}
8989
}
9090

eth/tracers/native/gen_callframe_json.go

Lines changed: 28 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)