Skip to content

Commit

Permalink
try to fix 'method handler crashed' for debug_traceCall erigontech#9090
Browse files Browse the repository at this point in the history
  • Loading branch information
marshalys committed May 18, 2024
1 parent 36b3311 commit c0420cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion turbo/jsonrpc/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ func (api *PrivateDebugAPIImpl) TraceCall(ctx context.Context, args ethapi.CallA
}

var stateReader state.StateReader
if config.TxIndex == nil || isLatest {
if config == nil || config.TxIndex == nil || isLatest {
stateReader, err = rpchelper.CreateStateReader(ctx, dbtx, blockNrOrHash, 0, api.filters, api.stateCache, chainConfig.ChainName)
} else {
stateReader, err = rpchelper.CreateHistoryStateReader(dbtx, blockNumber, int(*config.TxIndex), chainConfig.ChainName)
Expand Down

0 comments on commit c0420cf

Please sign in to comment.