Skip to content

Commit cdc20f4

Browse files
0xNeshiLeoPatOZ
andauthored
split event scanner code + add missing mod-level comments (#291)
Co-authored-by: Leo <[email protected]>
1 parent 81b3aba commit cdc20f4

File tree

14 files changed

+422
-300
lines changed

14 files changed

+422
-300
lines changed

src/event_scanner/scanner/block_range_handler.rs renamed to src/event_scanner/block_range_handler.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ pub trait BlockRangeHandler {
4444
/// This handler fetches logs per listener and forwards each non-empty result immediately. It is
4545
/// used by scanner modes that operate as continuous streams (e.g. historic/live scanning), where
4646
/// incremental delivery is preferred over collecting a fixed-size window.
47+
///
48+
/// # Concurrency
49+
///
50+
/// The `max_concurrent_fetches` limit applies **per listener**, not globally. With N listeners
51+
/// and a limit of M, up to N × M concurrent RPC requests may be in-flight simultaneously.
4752
#[derive(Debug)]
4853
pub struct StreamHandler<N: Network> {
4954
provider: RobustProvider<N>,
@@ -178,6 +183,11 @@ impl<N: Network> BlockRangeHandler for StreamHandler<N> {
178183
///
179184
/// During reorg recovery it prepends newly fetched logs so that the newest-first buffer remains
180185
/// correctly ordered.
186+
///
187+
/// # Concurrency
188+
///
189+
/// The `max_concurrent_fetches` limit applies **per listener**, not globally. With N listeners
190+
/// and a limit of M, up to N × M concurrent RPC requests may be in-flight simultaneously.
181191
#[derive(Debug)]
182192
pub struct LatestEventsHandler<N: Network> {
183193
provider: RobustProvider<N>,

0 commit comments

Comments
 (0)