Skip to content

Commit

Permalink
try to fix 'method handler crashed' for debug_traceCall of #9090 (#10502
Browse files Browse the repository at this point in the history
)

Cherry pick PR #10401 into the release branch

Co-authored-by: mars <marshalys@gmail.com>
  • Loading branch information
yperbasis and marshalys authored May 27, 2024
1 parent 2e500bd commit b0df97f
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, api.historyV3(dbtx), chainConfig.ChainName)
} else {
stateReader, err = rpchelper.CreateHistoryStateReader(dbtx, blockNumber, int(*config.TxIndex), api.historyV3(dbtx), chainConfig.ChainName)
Expand Down

0 comments on commit b0df97f

Please sign in to comment.