This commit is contained in:
cui 2026-07-17 21:52:58 -07:00 committed by GitHub
commit efe49c4e89
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -267,11 +267,13 @@ func (eth *Ethereum) stateAtTransaction(ctx context.Context, block *types.Block,
// Not yet the searched for transaction, execute on top of the current state
statedb.SetTxContext(tx.Hash(), idx, uint32(idx+1))
if _, err := core.ApplyMessage(evm, msg, nil); err != nil {
release()
return nil, vm.BlockContext{}, nil, nil, fmt.Errorf("transaction %#x failed: %v", tx.Hash(), err)
}
// Ensure any modifications are committed to the state
// Only delete empty objects if EIP158/161 (a.k.a Spurious Dragon) is in effect
statedb.Finalise(evm.ChainConfig().IsEIP158(block.Number()))
}
release()
return nil, vm.BlockContext{}, nil, nil, fmt.Errorf("transaction index %d out of range for block %#x", txIndex, block.Hash())
}