|
|
|
@ -641,7 +641,7 @@ impl StorageReader { |
|
|
|
|
.map_err(CorruptionError::new)?) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#[cfg(any(target_family = "wasm", not(feature = "rocksdb")))] |
|
|
|
|
#[cfg(any(target_family = "wasm"))] |
|
|
|
|
pub fn get_str(&self, key: &StrHash) -> Result<Option<String>, StorageError> { |
|
|
|
|
Ok(self |
|
|
|
|
.reader |
|
|
|
@ -658,7 +658,7 @@ impl StorageReader { |
|
|
|
|
.contains_key(&self.storage.id2str_cf, &key.to_be_bytes()) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#[cfg(any(target_family = "wasm", not(feature = "rocksdb")))] |
|
|
|
|
#[cfg(any(target_family = "wasm"))] |
|
|
|
|
pub fn contains_str(&self, key: &StrHash) -> Result<bool, StorageError> { |
|
|
|
|
self.reader |
|
|
|
|
.contains_key(&self.storage.id2str_cf, &key.to_be_bytes()) |
|
|
|
@ -777,7 +777,7 @@ impl StorageReader { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// Validates that all the storage invariants held in the data
|
|
|
|
|
#[cfg(any(target_family = "wasm", not(feature = "rocksdb")))] |
|
|
|
|
#[cfg(any(target_family = "wasm"))] |
|
|
|
|
#[allow(clippy::unused_self, clippy::unnecessary_wraps)] |
|
|
|
|
pub fn validate(&self) -> Result<(), StorageError> { |
|
|
|
|
Ok(()) // TODO
|
|
|
|
@ -1017,7 +1017,7 @@ impl<'a> StorageWriter<'a> { |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#[cfg(any(target_family = "wasm", not(feature = "rocksdb")))] |
|
|
|
|
#[cfg(any(target_family = "wasm"))] |
|
|
|
|
fn insert_str(&mut self, key: &StrHash, value: &str) -> Result<(), StorageError> { |
|
|
|
|
self.transaction.insert( |
|
|
|
|
&self.storage.id2str_cf, |
|
|
|
|