fn validate_expiry_height_mined(
    expiry_height: Option<Height>,
    block_height: &Height,
    transaction: &Transaction,
) -> Result<(), TransactionError> {
    if let Some(expiry_height) = expiry_height {
        if *block_height > expiry_height {
            return Err(TransactionError::ExpiredTransaction {
                expiry_height,
                block_height: *block_height,
                transaction_hash: transaction.hash(),
            })?;
        }
    }

    Ok(())
}
/// Validate the consensus rule: If a transaction is not a coinbase transaction
/// and its nExpiryHeight field is nonzero, then it MUST NOT be mined at a block
/// height greater than its nExpiryHeight.
///
/// The `transaction` is only used to create errors.
Validate the consensus rule: If a transaction is not a coinbase transaction
and its nExpiryHeight field is nonzero, then it MUST NOT be mined at a block
height greater than its nExpiryHeight.

The `transaction` is only used to create errors.
Validate the consensus rule : If a transaction is not a coinbase transaction and its nExpiryHeight field is nonzero then it MUST NOT be mined at a block height greater than its nExpiryHeight . The ` transaction ` is only used to create errors .
fn validate_expiry_height_mined(
    expiry_height: Option<Height>,
    block_height: &Height,
    transaction: &Transaction,
) -> Result<(), TransactionError> {
    if let Some(expiry_height) = expiry_height {
        if *block_height > expiry_height {
            return Err(TransactionError::ExpiredTransaction {
                expiry_height,
                block_height: *block_height,
                transaction_hash: transaction.hash(),
            })?;
        }
    }
    Ok(())
}
fn validate_expiry_height_mined ( expiry_height : Option < Height > , block_height : & Height , transaction : & Transaction , ) -> Result < ( ) , TransactionError > { if let Some ( expiry_height ) = expiry_height { if * block_height > expiry_height { return Err ( TransactionError :: ExpiredTransaction { expiry_height , block_height : * block_height , transaction_hash : transaction . hash ( ) , } ) ? ; } } Ok ( ( ) ) }
Validate the consensus rule: If a transaction is not a coinbase transaction
and its nExpiryHeight field is nonzero, then it MUST NOT be mined at a block
height greater than its nExpiryHeight.
Validate the consensus rule : If a transaction is not a coinbase transaction and its nExpiryHeight field is nonzero then it MUST NOT be mined at a block height greater than its nExpiryHeight .
expiry_height
Option<Height>
block_height
&Height
transaction
&Transaction