Skip to content

Commit b0df97f

Browse files
yperbasismarshalys
andauthored
try to fix 'method handler crashed' for debug_traceCall of #9090 (#10502)
Cherry pick PR #10401 into the release branch Co-authored-by: mars <marshalys@gmail.com>
1 parent 2e500bd commit b0df97f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

turbo/jsonrpc/tracing.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ func (api *PrivateDebugAPIImpl) TraceCall(ctx context.Context, args ethapi.CallA
325325
}
326326

327327
var stateReader state.StateReader
328-
if config.TxIndex == nil || isLatest {
328+
if config == nil || config.TxIndex == nil || isLatest {
329329
stateReader, err = rpchelper.CreateStateReader(ctx, dbtx, blockNrOrHash, 0, api.filters, api.stateCache, api.historyV3(dbtx), chainConfig.ChainName)
330330
} else {
331331
stateReader, err = rpchelper.CreateHistoryStateReader(dbtx, blockNumber, int(*config.TxIndex), api.historyV3(dbtx), chainConfig.ChainName)

0 commit comments

Comments
 (0)