@@ -374,13 +374,18 @@ impl<C: Deref , L: Deref > RoutingMessageHandler for NetGraphMsgHandler<C, L> wh
374
374
let mut pending_events = self . pending_events . lock ( ) . unwrap ( ) ;
375
375
let batch_count = batches. len ( ) ;
376
376
for ( batch_index, batch) in batches. into_iter ( ) . enumerate ( ) {
377
- // Per spec, the initial first_blocknum needs to be <= the query's first_blocknum and subsequent
378
- // must be >= the prior reply. We'll simplify this by using the query's first_blocknum since its
379
- // still spec compliant and sequence completion is now explicit.
377
+ // Per spec, the initial `first_blocknum` needs to be <= the query's `first_blocknum`
378
+ // and subsequent `first_blocknum`s must be >= the prior reply's `first_blocknum`.
379
+ // We'll simplify this by using the query's first_blocknum since its still spec
380
+ // compliant and sequence completion is now explicit.
380
381
let first_blocknum = msg. first_blocknum ;
381
382
382
- // Per spec, the last end_block needs to be >= the query's end_blocknum. Last
383
- // reply calculates difference between the query's end_blocknum and the start of the reply.
383
+ // Per spec, the last end_block needs to be >= the query's end_blocknum.
384
+ // Each message carries the number of blocks its contents fit in, though there is no
385
+ // requirement that we use exactly the number of blocks its contents are from.
386
+ //
387
+ // For the last reply, we calculate the difference between the query's end_blocknum and
388
+ // the start of the reply.
384
389
// Overflow safe since end_blocknum must be >= msg.first_block_num.
385
390
let number_of_blocks = if batch_index == batch_count-1 {
386
391
msg. end_blocknum ( ) - first_blocknum
0 commit comments