Skip to content

Commit

Permalink
chore: remove permanent storage kind function (#1110)
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhani-cw authored Jun 14, 2024
1 parent bff86a3 commit 7e1b56d
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 26 deletions.
5 changes: 0 additions & 5 deletions src/eth/storage/inmemory/inmemory_permanent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use tokio::sync::RwLock;
use tokio::sync::RwLockReadGuard;
use tokio::sync::RwLockWriteGuard;

use crate::config::PermanentStorageKind;
use crate::eth::primitives::Account;
use crate::eth::primitives::Address;
use crate::eth::primitives::Block;
Expand Down Expand Up @@ -134,10 +133,6 @@ impl Default for InMemoryPermanentStorage {

#[async_trait]
impl PermanentStorage for InMemoryPermanentStorage {
fn kind(&self) -> PermanentStorageKind {
PermanentStorageKind::InMemory
}

// -------------------------------------------------------------------------
// Block number operations
// -------------------------------------------------------------------------
Expand Down
8 changes: 0 additions & 8 deletions src/eth/storage/permanent_storage.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use async_trait::async_trait;

use crate::config::PermanentStorageKind;
use crate::eth::primitives::Account;
use crate::eth::primitives::Address;
use crate::eth::primitives::Block;
Expand All @@ -18,13 +17,6 @@ use crate::eth::primitives::TransactionMined;
/// Permanent (committed) storage operations
#[async_trait]
pub trait PermanentStorage: Send + Sync {
// -------------------------------------------------------------------------
// Metadata
// -------------------------------------------------------------------------

/// Returns the current implementation kind.
fn kind(&self) -> PermanentStorageKind;

// -------------------------------------------------------------------------
// Block number
// -------------------------------------------------------------------------
Expand Down
5 changes: 0 additions & 5 deletions src/eth/storage/rocks/rocks_permanent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use futures::future::join_all;
use super::rocks_state::RocksStorageState;
use super::types::AddressRocksdb;
use super::types::SlotIndexRocksdb;
use crate::config::PermanentStorageKind;
use crate::eth::primitives::Account;
use crate::eth::primitives::Address;
use crate::eth::primitives::Block;
Expand Down Expand Up @@ -59,10 +58,6 @@ impl RocksPermanentStorage {

#[async_trait]
impl PermanentStorage for RocksPermanentStorage {
fn kind(&self) -> PermanentStorageKind {
PermanentStorageKind::Rocks
}

// -------------------------------------------------------------------------
// Block number operations
// -------------------------------------------------------------------------
Expand Down
8 changes: 0 additions & 8 deletions src/eth/storage/stratus_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use std::sync::Arc;
use anyhow::anyhow;
use tracing::Span;

use crate::config::PermanentStorageKind;
use crate::eth::primitives::Account;
use crate::eth::primitives::Address;
use crate::eth::primitives::Block;
Expand Down Expand Up @@ -53,13 +52,6 @@ impl StratusStorage {
Self { temp, perm }
}

// -------------------------------------------------------------------------
// Metadata
// -------------------------------------------------------------------------
pub fn perm_kind(&self) -> PermanentStorageKind {
self.perm.kind()
}

// -------------------------------------------------------------------------
// Block number
// -------------------------------------------------------------------------
Expand Down

0 comments on commit 7e1b56d

Please sign in to comment.