mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
add comment
This commit is contained in:
parent
71114d6950
commit
b1d932ab2b
1 changed files with 4 additions and 0 deletions
|
|
@ -654,6 +654,10 @@ func (api *API) traceBlockParallel(ctx context.Context, block *types.Block, stat
|
||||||
TxIndex: task.index,
|
TxIndex: task.index,
|
||||||
TxHash: txs[task.index].Hash(),
|
TxHash: txs[task.index].Hash(),
|
||||||
}
|
}
|
||||||
|
// Reconstruct the block context for each transaction
|
||||||
|
// as the GetHash function of BlockContext is not safe for
|
||||||
|
// concurrent use.
|
||||||
|
// See: https://github.com/ethereum/go-ethereum/issues/29114
|
||||||
blockCtx := core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), nil)
|
blockCtx := core.NewEVMBlockContext(block.Header(), api.chainContext(ctx), nil)
|
||||||
res, err := api.traceTx(ctx, msg, txctx, blockCtx, task.statedb, config)
|
res, err := api.traceTx(ctx, msg, txctx, blockCtx, task.statedb, config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue