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 Nov 29, 2024
1 parent 9c63839 commit 6f6bdfb
Show file tree
Hide file tree
Showing 13 changed files with 1,433 additions and 1,807 deletions.
129 changes: 21 additions & 108 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 6f6bdfb

Please sign in to comment.