Skip to content

Commit 439fc1c

Browse files
committed
revert rewind collection change
1 parent 304e54c commit 439fc1c

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

src/event_scanner/scanner/common.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ pub fn spawn_log_consumers<N: Network>(
122122
if let ConsumerMode::CollectLatest { .. } = mode {
123123
if !collected.is_empty() {
124124
collected.reverse(); // restore chronological order
125-
info!("Sending collected logs to consumer");
126-
_ = sender.try_stream(collected).await;
127125
}
126+
127+
info!("Sending collected logs to consumer");
128+
_ = sender.try_stream(collected).await;
128129
}
129130
});
130131

tests/latest_events/basic.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ async fn no_past_events_returns_empty() -> anyhow::Result<()> {
7272

7373
scanner.start().await?;
7474

75+
let expected: &[TestCounter::CountIncreased] = &[];
76+
77+
assert_next!(stream, expected);
7578
assert_closed!(stream);
7679

7780
Ok(())

tests/sync/from_latest.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,13 @@ async fn no_historical_only_live_streams() -> anyhow::Result<()> {
147147

148148
scanner.start().await?;
149149

150+
// Latest is empty
151+
let expected: &[TestCounter::CountIncreased] = &[];
152+
assert_next!(stream, expected);
153+
let mut stream = assert_empty!(stream);
154+
150155
// give scanner time to start
151156
sleep(Duration::from_millis(10)).await;
152-
153157
// Live events arrive
154158
contract.increase().send().await?.watch().await?;
155159
contract.increase().send().await?.watch().await?;

0 commit comments

Comments
 (0)