eth/tracer: rename to revertReason (#26574)

This commit is contained in:
rjl493456442 2023-01-31 16:29:17 +08:00 committed by GitHub
parent 78d089b5b7
commit efbd508d21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 51 additions and 51 deletions

View File

@ -62,7 +62,7 @@ type callTrace struct {
Input hexutil.Bytes `json:"input"`
Output hexutil.Bytes `json:"output,omitempty"`
Error string `json:"error,omitempty"`
Revertal string `json:"revertReason,omitempty"`
RevertReason string `json:"revertReason,omitempty"`
Calls []callTrace `json:"calls,omitempty"`
Logs []callLog `json:"logs,omitempty"`
Value *hexutil.Big `json:"value,omitempty"`

View File

@ -50,7 +50,7 @@ type callFrame struct {
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"`
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
@ -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
}
}

View File

@ -24,7 +24,7 @@ func (c callFrame) MarshalJSON() ([]byte, error) {
Input hexutil.Bytes `json:"input" rlp:"optional"`
Output hexutil.Bytes `json:"output,omitempty" rlp:"optional"`
Error string `json:"error,omitempty" rlp:"optional"`
Revertal string `json:"revertReason,omitempty"`
RevertReason string `json:"revertReason,omitempty"`
Calls []callFrame `json:"calls,omitempty" rlp:"optional"`
Logs []callLog `json:"logs,omitempty" rlp:"optional"`
Value *hexutil.Big `json:"value,omitempty" rlp:"optional"`
@ -39,7 +39,7 @@ func (c callFrame) MarshalJSON() ([]byte, error) {
enc.Input = c.Input
enc.Output = c.Output
enc.Error = c.Error
enc.Revertal = c.Revertal
enc.RevertReason = c.RevertReason
enc.Calls = c.Calls
enc.Logs = c.Logs
enc.Value = (*hexutil.Big)(c.Value)
@ -58,7 +58,7 @@ func (c *callFrame) UnmarshalJSON(input []byte) error {
Input *hexutil.Bytes `json:"input" rlp:"optional"`
Output *hexutil.Bytes `json:"output,omitempty" rlp:"optional"`
Error *string `json:"error,omitempty" rlp:"optional"`
Revertal *string `json:"revertReason,omitempty"`
RevertReason *string `json:"revertReason,omitempty"`
Calls []callFrame `json:"calls,omitempty" rlp:"optional"`
Logs []callLog `json:"logs,omitempty" rlp:"optional"`
Value *hexutil.Big `json:"value,omitempty" rlp:"optional"`
@ -91,8 +91,8 @@ func (c *callFrame) UnmarshalJSON(input []byte) error {
if dec.Error != nil {
c.Error = *dec.Error
}
if dec.Revertal != nil {
c.Revertal = *dec.Revertal
if dec.RevertReason != nil {
c.RevertReason = *dec.RevertReason
}
if dec.Calls != nil {
c.Calls = dec.Calls