1#![doc(
8 html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
9 html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
10 issue_tracker_base_url = "https://github.com/SeismicSystems/seismic-reth/issues/"
11)]
12#![cfg_attr(not(test), warn(unused_crate_dependencies))]
13#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
14
15mod traits;
17pub use traits::*;
18
19pub mod providers;
21pub use providers::{
22 DatabaseProvider, DatabaseProviderRO, DatabaseProviderRW, HistoricalStateProvider,
23 HistoricalStateProviderRef, LatestStateProvider, LatestStateProviderRef, ProviderFactory,
24 StaticFileAccess, StaticFileWriter,
25};
26
27#[cfg(any(test, feature = "test-utils"))]
28pub mod test_utils;
30
31pub use reth_storage_errors::provider::{ProviderError, ProviderResult};
33
34pub use reth_execution_types::*;
35
36pub mod bundle_state;
37
38pub use revm::db::states::OriginalValuesKnown;
40
41pub mod writer;
43
44pub use reth_chain_state::{
45 CanonStateNotification, CanonStateNotificationSender, CanonStateNotificationStream,
46 CanonStateNotifications, CanonStateSubscriptions,
47};
48
49pub use reth_storage_api::{HistoryWriter, StatsReader};
51
52pub(crate) fn to_range<R: std::ops::RangeBounds<u64>>(bounds: R) -> std::ops::Range<u64> {
53 let start = match bounds.start_bound() {
54 std::ops::Bound::Included(&v) => v,
55 std::ops::Bound::Excluded(&v) => v + 1,
56 std::ops::Bound::Unbounded => 0,
57 };
58
59 let end = match bounds.end_bound() {
60 std::ops::Bound::Included(&v) => v + 1,
61 std::ops::Bound::Excluded(&v) => v,
62 std::ops::Bound::Unbounded => u64::MAX,
63 };
64
65 start..end
66}