From dda563a169d0ec74183aa297b09d1dbb7b48cbd5 Mon Sep 17 00:00:00 2001 From: Rob Walker Date: Mon, 16 Jul 2018 13:37:04 -0700 Subject: [PATCH] document process_blob() --- src/streamer.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/streamer.rs b/src/streamer.rs index 8055c9faf1..6082ff7214 100644 --- a/src/streamer.rs +++ b/src/streamer.rs @@ -304,6 +304,21 @@ fn retransmit_all_leader_blocks( Ok(()) } +/// process a blob: Add blob to the window. If a continuous set of blobs +/// starting from consumed is thereby formed, add that continuous +/// range of blobs to a queue to be sent on to the next stage. +/// +/// * `b` - the blob to be processed into the window and rebroadcast +/// * `pix` - the index of the blob, corresponds to +/// the entry height of this blob +/// * `w` - the index this blob would land at within the window +/// * `consume_queue` - output, blobs to be rebroadcast are placed here +/// * `locked_window` - the window we're operating on +/// * `debug_id` - this node's id in a useful-for-debug format +/// * `recycler` - where to return the blob once processed, also where +/// to return old blobs from the window +/// * `consumed` - input/output, the entry-height to which this +/// node has populated and rebroadcast entries fn process_blob( b: SharedBlob, pix: u64,