pub fn coinbase_tx_no_prevout_joinsplit_spend(tx: &Transaction) -> Result<(), TransactionError> {
    if tx.has_valid_coinbase_transaction_inputs() {
        if tx.contains_prevout_input() {
            return Err(TransactionError::CoinbaseHasPrevOutInput);
        } else if tx.joinsplit_count() > 0 {
            return Err(TransactionError::CoinbaseHasJoinSplit);
        } else if tx.sapling_spends_per_anchor().count() > 0 {
            return Err(TransactionError::CoinbaseHasSpend);
        }

        if let Some(orchard_shielded_data) = tx.orchard_shielded_data() {
            if orchard_shielded_data.flags.contains(Flags::ENABLE_SPENDS) {
                return Err(TransactionError::CoinbaseHasEnableSpendsOrchard);
            }
        }
    }

    Ok(())
}
/// Check that a coinbase transaction has no PrevOut inputs, JoinSplits, or spends.
///
/// A coinbase transaction MUST NOT have any transparent inputs, JoinSplit descriptions,
/// or Spend descriptions.
///
/// In a version 5 coinbase transaction, the enableSpendsOrchard flag MUST be 0.
///
/// This check only counts `PrevOut` transparent inputs.
///
/// https://zips.z.cash/protocol/protocol.pdf#txnencodingandconsensus
Check that a coinbase transaction has no PrevOut inputs, JoinSplits, or spends.
A coinbase transaction MUST NOT have any transparent inputs, JoinSplit descriptions,
or Spend descriptions.

In a version 5 coinbase transaction, the enableSpendsOrchard flag MUST be 0.

This check only counts `PrevOut` transparent inputs.


Check that a coinbase transaction has no PrevOut inputs JoinSplits or spends . A coinbase transaction MUST NOT have any transparent inputs JoinSplit descriptions or Spend descriptions . In a version 5 coinbase transaction the enableSpendsOrchard flag MUST be 0 . This check only counts ` PrevOut ` transparent inputs .
pub fn coinbase_tx_no_prevout_joinsplit_spend(tx: &Transaction) -> Result<(), TransactionError> {
    if tx.has_valid_coinbase_transaction_inputs() {
        if tx.contains_prevout_input() {
            return Err(TransactionError::CoinbaseHasPrevOutInput);
        } else if tx.joinsplit_count() > 0 {
            return Err(TransactionError::CoinbaseHasJoinSplit);
        } else if tx.sapling_spends_per_anchor().count() > 0 {
            return Err(TransactionError::CoinbaseHasSpend);
        }
        if let Some(orchard_shielded_data) = tx.orchard_shielded_data() {
            if orchard_shielded_data.flags.contains(Flags::ENABLE_SPENDS) {
                return Err(TransactionError::CoinbaseHasEnableSpendsOrchard);
            }
        }
    }
    Ok(())
}
pub fn coinbase_tx_no_prevout_joinsplit_spend ( tx : & Transaction ) -> Result < ( ) , TransactionError > { if tx . has_valid_coinbase_transaction_inputs ( ) { if tx . contains_prevout_input ( ) { return Err ( TransactionError :: CoinbaseHasPrevOutInput ) ; } else if tx . joinsplit_count ( ) > 0 { return Err ( TransactionError :: CoinbaseHasJoinSplit ) ; } else if tx . sapling_spends_per_anchor ( ) . count ( ) > 0 { return Err ( TransactionError :: CoinbaseHasSpend ) ; } if let Some ( orchard_shielded_data ) = tx . orchard_shielded_data ( ) { if orchard_shielded_data . flags . contains ( Flags :: ENABLE_SPENDS ) { return Err ( TransactionError :: CoinbaseHasEnableSpendsOrchard ) ; } } } Ok ( ( ) ) }
Check that a coinbase transaction has no PrevOut inputs, JoinSplits, or spends.
Check that a coinbase transaction has no PrevOut inputs JoinSplits or spends .
tx
&Transaction