Skip to main content

encode_flow_prepare

Function encode_flow_prepare 

Source
pub fn encode_flow_prepare(
    sender: NodeId,
    session: LinkSessionId,
    epoch: ReceiveEpoch,
    prepare: Prepare<'_>,
    metadata: &mut [u8],
    payload: &mut [u8],
    limits: WireLimits,
) -> Result<PrepareEncoding, WireError>
Expand description

Encode epoch-bound normal data with a mandatory receiver-issued epoch.

Distinct PREPARE_FLOW bytes prevent silent mixing with legacy PREPARE schemas. Adds exactly 16 metadata bytes per batch. Canonical identities/body digests are unchanged, and no additional body hashing or allocation is performed.