mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-15 16:33:47 +00:00
including interrupt context back
This commit is contained in:
parent
92b79beb34
commit
fcdefd9e51
1 changed files with 7 additions and 0 deletions
|
|
@ -88,6 +88,13 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
|
||||||
}
|
}
|
||||||
// Iterate over and process the individual transactions
|
// Iterate over and process the individual transactions
|
||||||
for i, tx := range block.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)
|
msg, err := TransactionToMessage(tx, signer, header.BaseFee)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("could not apply tx %d [%v]: %w", i, tx.Hash().Hex(), err)
|
return nil, fmt.Errorf("could not apply tx %d [%v]: %w", i, tx.Hash().Hex(), err)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue