fix(eth): mark anchor transaction in traceBlockParallel (#243)

* mark anchor tx

* fix comments
This commit is contained in:
maskpp 2024-05-09 10:23:43 +08:00 committed by GitHub
parent ce49aa43bb
commit 8622b2cce0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)