zebra_state::service::check::utxo

Function remaining_transaction_value

source
pub fn remaining_transaction_value(
    semantically_verified: &SemanticallyVerifiedBlock,
    utxos: &HashMap<OutPoint, OrderedUtxo>,
) -> Result<(), ValidateContextError>
Expand description

Reject negative remaining transaction value.

“As in Bitcoin, the remaining value in the transparent transaction value pool of a non-coinbase transaction is available to miners as a fee.

The remaining value in the transparent transaction value pool of a coinbase transaction is destroyed.

Consensus rule: The remaining value in the transparent transaction value pool MUST be nonnegative.“

https://zips.z.cash/protocol/protocol.pdf#transactions