Skip to content

Commit

Permalink
Merge pull request #2244 from CortexFoundation/dev
Browse files Browse the repository at this point in the history
error check fix
  • Loading branch information
ucwong authored Jan 14, 2025
2 parents 4c8d745 + 4c978d8 commit 0088737
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ctxc/tracers/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package logger
import (
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"io"
"math/big"
Expand Down Expand Up @@ -245,7 +246,7 @@ func (l *StructLogger) GetResult() (json.RawMessage, error) {
returnData := common.CopyBytes(l.output)
// Return data when successful and revert reason when reverted, otherwise empty.
returnVal := fmt.Sprintf("%x", returnData)
if failed && l.err != vm.ErrExecutionReverted {
if failed && !errors.Is(l.err, vm.ErrExecutionReverted) {
returnVal = ""
}
return json.Marshal(&ExecutionResult{
Expand Down

0 comments on commit 0088737

Please sign in to comment.