cuprate_consensus_rules::transactions

Function check_transaction_semantic

Source
pub fn check_transaction_semantic(
    tx: &Transaction,
    tx_blob_size: usize,
    tx_weight: usize,
    tx_hash: &[u8; 32],
    hf: HardFork,
    verifier: impl BatchVerifier,
) -> Result<u64, TransactionError>
Expand description

Checks the transaction is semantically valid.

Semantic rules are rules that don’t require blockchain context, the hard-fork does not require blockchain context as:

  • The tx-pool will use the current hard-fork
  • When syncing the hard-fork is in the block header.

To fully verify a transaction this must be accompanied by check_transaction_contextual