Make trace block resilient to individual trace tx errors (#36)

* Make trace block resilient to individual trace tx errors

* add logging

* add more logging

* add more logging 2

* add more logging 3

* cleanup all logs
This commit is contained in:
Jeremy Wei 2024-11-20 09:12:52 -05:00 committed by GitHub
parent da7da77412
commit bf6b5923d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -613,9 +613,10 @@ func (api *API) traceBlock(ctx context.Context, block *types.Block, config *Trac
} }
res, err := api.traceTx(ctx, tx, msg, txctx, blockCtx, statedb, config) res, err := api.traceTx(ctx, tx, msg, txctx, blockCtx, statedb, config)
if err != nil { if err != nil {
return nil, err results[i] = &txTraceResult{TxHash: tx.Hash(), Error: err.Error()}
} else {
results[i] = &txTraceResult{TxHash: tx.Hash(), Result: res}
} }
results[i] = &txTraceResult{TxHash: tx.Hash(), Result: res}
} }
return results, nil return results, nil
} }