Skip to main content

is_coinbase

Function is_coinbase 

Source
pub fn is_coinbase<A: Authorization>(tx: &TransactionData<A>) -> bool
Expand description

Returns true if tx is a coinbase transaction.

A transaction is a coinbase transaction if it has a transparent bundle with exactly one input, and that input’s prevout is [OutPoint::NULL]. A transaction with no transparent bundle is not a coinbase transaction. The consensus rules place further requirements on the shielded parts of a coinbase transaction; this function does not check them.