Skip to content

Commit

Permalink
debug_traceCallMany -1 txindex support (fixed) (#12688)
Browse files Browse the repository at this point in the history
closes #12653

---------

Co-authored-by: JkLondon <[email protected]>
  • Loading branch information
JkLondon and JkLondon authored Nov 9, 2024
1 parent cdcf235 commit 5d9ec47
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions turbo/jsonrpc/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,10 @@ func (api *PrivateDebugAPIImpl) TraceCallMany(ctx context.Context, bundles []Bun
transactionIndex = *simulateContext.TransactionIndex
}

if transactionIndex == -1 {
transactionIndex = len(block.Transactions())
}

stateReader, err := rpchelper.CreateStateReader(ctx, tx, api._blockReader, rpc.BlockNumberOrHashWithNumber(rpc.BlockNumber(blockNum-1)), transactionIndex, api.filters, api.stateCache, chainConfig.ChainName)
if err != nil {
stream.WriteNil()
Expand Down

0 comments on commit 5d9ec47

Please sign in to comment.