Skip to main content

coinbase_input

Function coinbase_input 

Source
pub fn coinbase_input(
    height: BlockHeight,
    miner_data: Option<PushValue>,
) -> Result<TxIn<Coinbase>, Error>
Expand description

Creates the input of a coinbase transaction for the block at height.

The input’s script_sig encodes height, followed by miner_data if it is given. Without miner_data, a height that encodes to a single byte is followed by OP_0, so that the script has the minimum length of MIN_COINBASE_SCRIPT_LEN bytes.

Returns: