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.