Skip to content

Commit

Permalink
tests,fix: Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-smith committed Nov 16, 2023
1 parent 293eb9d commit 1ec8d6a
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions eth/tracers/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1392,8 +1392,6 @@ func (api *API) traceTx(ctx context.Context, message *core.Message, txctx *Conte
// Call Prepare to clear out the statedb access list
statedb.SetTxContext(txctx.TxHash, txctx.TxIndex)

var result *core.ExecutionResult

if config.BorTx == nil {
config.BorTx = newBoolPtr(false)
}
Expand All @@ -1414,17 +1412,7 @@ func (api *API) traceTx(ctx context.Context, message *core.Message, txctx *Conte
// Depending on the tracer type, format and return the output.
switch tracer := tracer.(type) {
case *logger.StructLogger:
// If the result contains a revert reason, return it.
returnVal := fmt.Sprintf("%x", result.Return())
if len(result.Revert()) > 0 {
returnVal = fmt.Sprintf("%x", result.Revert())
}
return &ethapi.ExecutionResult{
Gas: result.UsedGas,
Failed: result.Failed(),
ReturnValue: returnVal,
StructLogs: ethapi.FormatLogs(tracer.StructLogs()),
}, nil
return tracer.GetResult()

case Tracer:
return tracer.GetResult()
Expand Down

0 comments on commit 1ec8d6a

Please sign in to comment.