Skip to content

Commit

Permalink
rpcdaemon: Add missing flag (#12451)
Browse files Browse the repository at this point in the history
Cherry pick #12364 into `release/2.61`

Co-authored-by: Shoham Chakraborty <shhmchk@gmail.com>
  • Loading branch information
yperbasis and shohamc1 authored Oct 24, 2024
1 parent db1a157 commit c2a332d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions turbo/jsonrpc/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,6 @@ func (api *PrivateDebugAPIImpl) traceBlock(ctx context.Context, blockNrOrHash rp
}
engine := api.engine()

_, blockCtx, _, ibs, _, err := transactions.ComputeTxEnv(ctx, engine, block, chainConfig, api._blockReader, tx, 0, api.historyV3(tx), false)
if err != nil {
stream.WriteNil()
return err
}

signer := types.MakeSigner(chainConfig, block.NumberU64(), block.Time())
rules := chainConfig.Rules(block.NumberU64(), block.Time())
stream.WriteArrayStart()

txns := block.Transactions()
var borStateSyncTxn types.Transaction
if *config.BorTraceEnabled {
Expand All @@ -109,6 +99,16 @@ func (api *PrivateDebugAPIImpl) traceBlock(ctx context.Context, blockNrOrHash rp
}
}

_, blockCtx, _, ibs, _, err := transactions.ComputeTxEnv(ctx, engine, block, chainConfig, api._blockReader, tx, 0, api.historyV3(tx), borStateSyncTxn != nil)
if err != nil {
stream.WriteNil()
return err
}

signer := types.MakeSigner(chainConfig, block.NumberU64(), block.Time())
rules := chainConfig.Rules(block.NumberU64(), block.Time())
stream.WriteArrayStart()

for idx, txn := range txns {
isBorStateSyncTxn := borStateSyncTxn == txn
var txnHash common.Hash
Expand Down
2 changes: 1 addition & 1 deletion turbo/transactions/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func ComputeTxEnv(ctx context.Context, engine consensus.EngineReader, block *typ
}

if isBorStateSyncTxn && txIndex == len(block.Transactions()) {
// tx is a state sync transaction
// we can reach here if the block has 0 normal transactions but has state sync transactions
return nil, blockContext, evmtypes.TxContext{}, statedb, reader, nil
}

Expand Down

0 comments on commit c2a332d

Please sign in to comment.