Skip to content

Commit

Permalink
fix(eth): mark anchor transaction in traceBlockParallel (#243)
Browse files Browse the repository at this point in the history
* mark anchor tx

* fix comments
  • Loading branch information
mask-pp committed May 9, 2024
1 parent ce49aa4 commit 8622b2c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions eth/tracers/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,14 @@ func (api *API) traceBlockParallel(ctx context.Context, block *types.Block, stat
if threads > len(txs) {
threads = len(txs)
}

// CHANGE(taiko): mark the first transaction as anchor transaction.
if len(txs) > 0 && api.backend.ChainConfig().Taiko {
if err := txs[0].MarkAsAnchor(); err != nil {
return nil, err
}
}

jobs := make(chan *txTraceTask, threads)
for th := 0; th < threads; th++ {
pend.Add(1)
Expand Down

0 comments on commit 8622b2c

Please sign in to comment.