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:
Error::GenesisInputNotSupportedifheightis 0;Error::OversizedHeightif the encoded height exceedsMAX_COINBASE_HEIGHT_LENbytes;Error::OversizedScriptif the script exceedsMAX_COINBASE_SCRIPT_LENbytes.