File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
src/event_scanner/scanner Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 ( ( ) )
Original file line number Diff line number Diff 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 ?;
You can’t perform that action at this time.
0 commit comments