-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b095099
commit 9c84bbf
Showing
2 changed files
with
21 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
use std::path::PathBuf; | ||
|
||
/// We use the tower-like layering functionality that has been baked into the alloy-provider to | ||
/// intercept the requests and redirect to the `RethDbProvider`. | ||
pub struct RethDBLayer { | ||
db_path: PathBuf, | ||
} | ||
|
||
/// Initialize the `RethDBLayer` with the path to the reth datadir. | ||
impl RethDBLayer { | ||
pub const fn new(db_path: PathBuf) -> Self { | ||
Self { db_path } | ||
} | ||
|
||
pub const fn db_path(&self) -> &PathBuf { | ||
&self.db_path | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters