Module serialize

Source
Expand description

Serializes and deserializes transparent data.

Constantsยง

GENESIS_COINBASE_DATA
The coinbase data for a genesis block.
MAX_COINBASE_DATA_LEN
The maximum length of the coinbase data.
MAX_COINBASE_HEIGHT_DATA_LEN
The maximum length of the encoded coinbase height.
MIN_COINBASE_DATA_LEN
The minimum length of the coinbase data.

Functionsยง

parse_coinbase_height ๐Ÿ”’
Split data into a block height and remaining miner-controlled coinbase data.
write_coinbase_height ๐Ÿ”’
Encode height into a block height, as a prefix of the coinbase data. Does not write coinbase_data.