Function zebra_consensus::block::check::coinbase_is_first

source ยท
pub fn coinbase_is_first(block: &Block) -> Result<Arc<Transaction>, BlockError>
Expand description

Checks if there is exactly one coinbase transaction in Block, and if that coinbase transaction is the first transaction in the block. Returns the coinbase transaction is successful.

A transaction that has a single transparent input with a null prevout field, is called a coinbase transaction. Every block has a single coinbase transaction as the first transaction in the block.

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