fuel_core_compression::compress

Function compress

Source
pub async fn compress<D>(
    config: Config,
    db: D,
    block: &Block,
) -> Result<VersionedCompressedBlock>
where D: CompressDb,
Expand description

This must be called for all new blocks in sequence, otherwise the result will be garbage, since the registry is valid for only the current block height. On any other height you could be referring to keys that have already been overwritten, or have not been written to yet.