including interrupt context back

This commit is contained in:
Lucca Martins 2025-02-16 16:49:40 -03:00
parent 92b79beb34
commit fcdefd9e51
No known key found for this signature in database
GPG key ID: DC3D7F76BDAE23BF

View file

@ -88,6 +88,13 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
}
// Iterate over and process the individual transactions
for i, tx := range block.Transactions() {
if interruptCtx != nil {
select {
case <-interruptCtx.Done():
return nil, interruptCtx.Err()
default:
}
}
msg, err := TransactionToMessage(tx, signer, header.BaseFee)
if err != nil {
return nil, fmt.Errorf("could not apply tx %d [%v]: %w", i, tx.Hash().Hex(), err)