diff --git a/crates/storage/src/error.rs b/crates/storage/src/error.rs new file mode 100644 index 00000000..8333a2cf --- /dev/null +++ b/crates/storage/src/error.rs @@ -0,0 +1,5 @@ +#[derive(Debug, thiserror::Error)] +pub enum Error { + #[error("storage error: {0}")] + Storage(#[from] crate::api::Error), +} diff --git a/crates/storage/src/lib.rs b/crates/storage/src/lib.rs index bb27e949..de5f20df 100644 --- a/crates/storage/src/lib.rs +++ b/crates/storage/src/lib.rs @@ -1,5 +1,6 @@ mod api; pub mod backend; +mod error; mod store; pub use api::{ALL_TABLES, StorageBackend, StorageReadView, StorageWriteBatch, Table}; diff --git a/crates/storage/src/store.rs b/crates/storage/src/store.rs index bd36bb59..3aea2a18 100644 --- a/crates/storage/src/store.rs +++ b/crates/storage/src/store.rs @@ -1,7 +1,8 @@ use std::collections::{BTreeMap, HashMap, HashSet, VecDeque}; use std::sync::{Arc, LazyLock, Mutex}; -use crate::api::{Error, StorageBackend, StorageWriteBatch, Table}; +use crate::api::{StorageBackend, StorageWriteBatch, Table}; +use crate::error::Error; use ethlambda_types::{ attestation::{AggregationBits, AttestationData, HashedAttestationData, bits_is_subset},