Skip to main content

encode_bip34_coinbase_script

Function encode_bip34_coinbase_script 

Source
pub fn encode_bip34_coinbase_script(height: u64) -> Vec<u8> ⓘ
Expand description

Coinbase scriptSig whose prefix is the BIP34 height encoding.

Height 0 is OP_0. Heights 1..=16 are OP_1..=OP_16. Taller heights are one length byte plus the minimal little-endian magnitude. A trailing 0xff keeps the script at least 2 bytes, the coinbase minimum.