Skip to content

Commit 8345b83

Browse files
committed
comment: about pending block
1 parent 45ac5e7 commit 8345b83

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/event_scanner/scanner/historic.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,24 @@ use crate::{
1212
};
1313

1414
impl EventScannerBuilder<Historic> {
15+
/// Sets the starting block for the historic scan.
16+
///
17+
/// # Note
18+
///
19+
/// Although passing `BlockNumberOrTag::Finalized` will compile, the subsequent call to
20+
/// `connect` will fail at runtime. See issue <https://github.com/OpenZeppelin/Event-Scanner/issues/244>
1521
#[must_use]
1622
pub fn from_block(mut self, block_id: impl Into<BlockId>) -> Self {
1723
self.config.from_block = block_id.into();
1824
self
1925
}
2026

27+
/// Sets the ending block for the historic scan.
28+
///
29+
/// # Note
30+
///
31+
/// Although passing `BlockNumberOrTag::Finalized` will compile, the subsequent call to
32+
/// `connect` will fail at runtime. See issue <https://github.com/OpenZeppelin/Event-Scanner/issues/244>
2133
#[must_use]
2234
pub fn to_block(mut self, block_id: impl Into<BlockId>) -> Self {
2335
self.config.to_block = block_id.into();

src/event_scanner/scanner/latest.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,24 @@ impl EventScannerBuilder<LatestEvents> {
1818
self
1919
}
2020

21+
/// Sets the starting block for the latest events scan.
22+
///
23+
/// # Note
24+
///
25+
/// Although passing `BlockNumberOrTag::Finalized` will compile, the subsequent call to
26+
/// `connect` will fail at runtime. See issue <https://github.com/OpenZeppelin/Event-Scanner/issues/244>
2127
#[must_use]
2228
pub fn from_block(mut self, block_id: impl Into<BlockId>) -> Self {
2329
self.config.from_block = block_id.into();
2430
self
2531
}
2632

33+
/// Sets the ending block for the latest events scan.
34+
///
35+
/// # Note
36+
///
37+
/// Although passing `BlockNumberOrTag::Finalized` will compile, the subsequent call to
38+
/// `connect` will fail at runtime. See issue <https://github.com/OpenZeppelin/Event-Scanner/issues/244>
2739
#[must_use]
2840
pub fn to_block(mut self, block_id: impl Into<BlockId>) -> Self {
2941
self.config.to_block = block_id.into();

0 commit comments

Comments
 (0)