/// Confirm that the (sum of the outputs) - (sum of inputs) = Kernel excess
///
/// The offset_and_reward commitment includes the offset & the total coinbase reward (block reward + fees for
/// block balances, or zero for transaction balances)
Confirm that the (sum of the outputs) - (sum of inputs) = Kernel excess
The offset_and_reward commitment includes the offset & the total coinbase reward (block reward + fees for
block balances, or zero for transaction balances)
Confirm that the ( sum of the outputs ) - ( sum of inputs ) = Kernel excess The offset_and_reward commitment includes the offset & the total coinbase reward ( block reward + fees for block balances or zero for transaction balances )
fn validate_kernel_sum(
        &self,
        offset_and_reward: Commitment,
        factory: &CommitmentFactory,
    ) -> Result<(), TransactionError>
    {
        trace!(target: LOG_TARGET, "Checking kernel total");
        let KernelSum { sum: excess, fees } = self.sum_kernels(offset_and_reward);
        let sum_io = self.sum_commitments();
        let fees = factory.commit_value(&PrivateKey::default(), fees.into());
        if excess != &sum_io + &fees {
            return Err(TransactionError::ValidationError(
                "Sum of inputs and outputs did not equal sum of kernels with fees".into(),
            ));
        }
        Ok(())
    }
fn validate_kernel_sum ( & self , offset_and_reward : Commitment , factory : & CommitmentFactory , ) -> Result < ( ) , TransactionError > { trace ! ( target LOG_TARGET " " ) ; let KernelSum { sum : excess , fees } = self . sum_kernels ( offset_and_reward ) ; let sum_io = self . sum_commitments ( ) ; let fees = factory . commit_value ( & PrivateKey :: default ( ) , fees . into ( ) ) ; if excess != & sum_io + & fees { return Err ( TransactionError :: ValidationError ( " " . into ( ) , ) ) ; } Ok ( ( ) ) }
Confirm that the (sum of the outputs) - (sum of inputs) = Kernel excess
The offset_and_reward commitment includes the offset & the total coinbase reward (block reward + fees for
block balances, or zero for transaction balances)
Confirm that the ( sum of the outputs ) - ( sum of inputs ) = Kernel excess The offset_and_reward commitment includes the offset & the total coinbase reward ( block reward + fees for block balances or zero for transaction balances )
&self
offset_and_reward
Commitment
factory
&CommitmentFactory