feat: use pipeline for reth stage unwind (#7085)

Co-authored-by: joshieDo <ranriver@protonmail.com>
Co-authored-by: joshieDo <93316087+joshieDo@users.noreply.github.com>
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
This commit is contained in:
Panagiotis Ganelis
2024-04-02 20:50:05 +03:00
committed by GitHub
parent 16c76b6ce6
commit 3726cd17e8
5 changed files with 248 additions and 51 deletions

View File

@@ -44,6 +44,11 @@ impl HighestStaticFiles {
StaticFileSegment::Receipts => &mut self.receipts,
}
}
/// Returns the maximum block of all segments.
pub fn max(&self) -> Option<u64> {
[self.headers, self.transactions, self.receipts].iter().filter_map(|&option| option).max()
}
}
/// Each static file has a fixed number of blocks. This gives out the range where the requested