Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuang committed Oct 27, 2023
1 parent 4ce15f7 commit 159c4d1
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions x/evm/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,6 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ
return nil, status.Errorf(codes.InvalidArgument, "output limit cannot be negative, got %d", req.TraceConfig.Limit)
}

var overrides *rpctypes.StateOverride
if len(req.Overrides) > 0 {
if err := json.Unmarshal(req.Overrides, overrides); err != nil {
return nil, status.Error(codes.InvalidArgument, err.Error())
}
}

// get the context of block beginning
contextHeight := req.BlockNumber
if contextHeight < 1 {
Expand Down Expand Up @@ -470,7 +463,7 @@ func (k Keeper) TraceTx(c context.Context, req *types.QueryTraceTxRequest) (*typ
_ = json.Unmarshal([]byte(req.TraceConfig.TracerJsonConfig), &tracerConfig)
}

result, _, err := k.traceTx(ctx, cfg, txConfig, signer, tx, req.TraceConfig, false, tracerConfig, overrides)
result, _, err := k.traceTx(ctx, cfg, txConfig, signer, tx, req.TraceConfig, false, tracerConfig)
if err != nil {
// error will be returned with detail status from traceTx
return nil, err
Expand Down Expand Up @@ -528,7 +521,7 @@ func (k Keeper) TraceBlock(c context.Context, req *types.QueryTraceBlockRequest)
ethTx := tx.AsTransaction()
txConfig.TxHash = ethTx.Hash()
txConfig.TxIndex = uint(i)
traceResult, logIndex, err := k.traceTx(ctx, cfg, txConfig, signer, ethTx, req.TraceConfig, true, nil, nil)
traceResult, logIndex, err := k.traceTx(ctx, cfg, txConfig, signer, ethTx, req.TraceConfig, true, nil)
if err != nil {
result.Error = err.Error()
} else {
Expand Down Expand Up @@ -558,7 +551,6 @@ func (k *Keeper) traceTx(
traceConfig *types.TraceConfig,
commitMessage bool,
tracerJSONConfig json.RawMessage,
overrides *rpctypes.StateOverride,
) (*interface{}, uint, error) {
// Assemble the structured logger or the JavaScript tracer
var (
Expand Down Expand Up @@ -622,7 +614,7 @@ func (k *Keeper) traceTx(
}
}()

res, err := k.ApplyMessageWithConfig(ctx, msg, tracer, commitMessage, cfg, txConfig, overrides)
res, err := k.ApplyMessageWithConfig(ctx, msg, tracer, commitMessage, cfg, txConfig, nil)
if err != nil {
return nil, 0, status.Error(codes.Internal, err.Error())
}
Expand Down

0 comments on commit 159c4d1

Please sign in to comment.