Skip to main content

batch_store

Function batch_store 

Source
pub async fn batch_store(
    endpoint: &Endpoint,
    target: EndpointAddr,
    entries: Vec<(ContentHash, Coverage)>,
    holder: NodeId,
) -> Result<BatchStoreAck>
Expand description

Send a single BatchStore request to target and return the ack (ADR 022 §STORE Flow Batched STORE). One bool per request hash comes back in request order. Used by the re-publish scheduler, which groups a drain cycle’s hashes by receiver and sends each receiver its set via this. Every DHT node implements BatchStore, so there is no per-hash fallback.

entries MUST be ≤ decdn_protocol::dht::MAX_BATCH_STORE_HASHES; an oversize batch is rejected by the receiver at wire decode with MALFORMED_MESSAGE and surfaces here as an error (the caller must split the set, not retry).