def apply_all_transactions(
            self,
            transactions: Tuple[BaseTransaction, ...],
            base_header: BlockHeader
    ) -> Tuple[BlockHeader, Tuple[Receipt, ...], Tuple[BaseComputation, ...]]:
        """
        Determine the results of applying all transactions to the base header.
        This does *not* update the current block or header of the VM.

        :param transactions: an iterable of all transactions to apply
        :param base_header: the starting header to apply transactions to
        :return: the final header, the receipts of each transaction, and the computations
        """
        if base_header.block_number != self.header.block_number:
            raise ValidationError(
                "This VM instance must only work on block #{}, "
                "but the target header has block #{}".format(
                    self.header.block_number,
                    base_header.block_number,
                )
            )

        receipts = []
        computations = []
        previous_header = base_header
        result_header = base_header

        for transaction in transactions:
            receipt, computation = self.apply_transaction(
                previous_header,
                transaction,
            )
            result_header = self.add_receipt_to_header(previous_header, receipt)
            previous_header = result_header
            receipts.append(receipt)
            computations.append(computation)

        receipts_tuple = tuple(receipts)
        computations_tuple = tuple(computations)

        return result_header, receipts_tuple, computations_tuple
def apply_all_transactions ( self , transactions : Tuple [ BaseTransaction , ... ] , base_header : BlockHeader ) -> Tuple [ BlockHeader , Tuple [ Receipt , ... ] , Tuple [ BaseComputation , ... ] ] : if base_header . block_number != self . header . block_number : raise ValidationError ( "This VM instance must only work on block #{}, " "but the target header has block #{}" . format ( self . header . block_number , base_header . block_number , ) ) receipts = [ ] computations = [ ] previous_header = base_header result_header = base_header for transaction in transactions : receipt , computation = self . apply_transaction ( previous_header , transaction , ) result_header = self . add_receipt_to_header ( previous_header , receipt ) previous_header = result_header receipts . append ( receipt ) computations . append ( computation ) receipts_tuple = tuple ( receipts ) computations_tuple = tuple ( computations ) return result_header , receipts_tuple , computations_tuple
Determine the results of applying all transactions to the base header.
        This does *not* update the current block or header of the VM.

        :param transactions: an iterable of all transactions to apply
        :param base_header: the starting header to apply transactions to
        :return: the final header, the receipts of each transaction, and the computations