Skip to content

Commit

Permalink
fix: include start block if matched
Browse files Browse the repository at this point in the history
  • Loading branch information
morgsmccauley committed Jul 11, 2024
1 parent 06532c8 commit 47588f2
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ impl ReceiverBlocksProcessor {
}

for block_height in bitmap_for_day.iter() {
if block_height > start_block_height {
if block_height >= start_block_height {
yield block_height;
}
}
Expand Down Expand Up @@ -349,7 +349,10 @@ mod tests {
let stream =
reciever_blocks_processor.stream_matching_block_heights(2, "someone.near".to_owned());

assert_eq!(stream.try_collect::<Vec<u64>>().await.unwrap(), vec![3, 4]);
assert_eq!(
stream.try_collect::<Vec<u64>>().await.unwrap(),
vec![2, 3, 4]
);
}

#[tokio::test]
Expand Down

0 comments on commit 47588f2

Please sign in to comment.