pub(crate) fn write_coinbase_height<W: Write>(
    height: Height,
    coinbase_data: &CoinbaseData,
    w: W,
) -> Result<(), Error>
Expand description

Encode height into a block height, as a prefix of the coinbase data. Does not write coinbase_data.

The height may produce 0..=5 initial bytes of coinbase data.

§Errors

Returns an error if the coinbase height is zero, and the coinbase_data does not match the Zcash mainnet and testnet genesis coinbase data. (They are identical.)

This check is required, because the genesis block does not include an encoded coinbase height,