-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(l1): cleanup storage crate. (#2049)
**Motivation** Prepare the ground to divide the store into multiple stores (state, history, etc) **Description** - Created `lib.rs` file that exposed the modules to the outside world. - Renamed `engines` to `store_db` to be more aligned with `trie_db` - Renamed `storage.rs` to `store.rs`
- Loading branch information
Showing
9 changed files
with
43 additions
and
39 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 |
---|---|---|
|
@@ -33,4 +33,4 @@ hex-literal.workspace = true | |
tempdir = "0.3.7" | ||
|
||
[lib] | ||
path = "./storage.rs" | ||
path = "./lib.rs" |
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
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,13 @@ | ||
mod api; | ||
|
||
mod rlp; | ||
mod store; | ||
mod store_db; | ||
mod trie_db; | ||
mod utils; | ||
|
||
pub mod error; | ||
pub use store::{ | ||
hash_address, hash_key, AccountUpdate, EngineType, Store, MAX_SNAPSHOT_READS, | ||
STATE_TRIE_SEGMENTS, | ||
}; |
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
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
6 changes: 3 additions & 3 deletions
6
crates/storage/store/engines/libmdbx.rs → crates/storage/store/store_db/libmdbx.rs
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
2 changes: 0 additions & 2 deletions
2
crates/storage/store/engines.rs → crates/storage/store/store_db/mod.rs
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
pub mod api; | ||
pub mod in_memory; | ||
#[cfg(feature = "libmdbx")] | ||
pub mod libmdbx; | ||
#[cfg(feature = "redb")] | ||
pub mod redb; | ||
mod utils; |
31 changes: 13 additions & 18 deletions
31
crates/storage/store/engines/redb.rs → crates/storage/store/store_db/redb.rs
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
File renamed without changes.