Skip to content

Commit

Permalink
Use redb instead of SQLite
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHinshelwood committed Dec 11, 2024
1 parent 59f299a commit 20015e0
Show file tree
Hide file tree
Showing 22 changed files with 1,580 additions and 1,879 deletions.
154 changes: 32 additions & 122 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions eth-trie.rs/src/db.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{collections::HashMap, error::Error, sync::Arc};
use std::{collections::HashMap, fmt::Display, sync::Arc};

use parking_lot::RwLock;

Expand All @@ -8,7 +8,7 @@ use crate::errors::MemDBError;
/// You should first write the data to the cache and write the data
/// to the database in bulk after the end of a set of operations.
pub trait DB: Send + Sync {
type Error: Error;
type Error: Display;

fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>, Self::Error>;

Expand Down
Loading

0 comments on commit 20015e0

Please sign in to comment.