From 0420ec88fb7afab81c519332f40ad1899a09fab9 Mon Sep 17 00:00:00 2001 From: carneiro-cw <156914855+carneiro-cw@users.noreply.github.com> Date: Mon, 17 Jun 2024 19:09:12 -0300 Subject: [PATCH] chore: remove #[async_trait] from PermanentStorage and TemporaryStorage (#1148) --- src/eth/storage/inmemory/inmemory_permanent.rs | 2 -- src/eth/storage/inmemory/inmemory_temporary.rs | 2 -- src/eth/storage/permanent_storage.rs | 3 --- src/eth/storage/rocks/rocks_permanent.rs | 2 -- src/eth/storage/temporary_storage.rs | 3 --- 5 files changed, 12 deletions(-) diff --git a/src/eth/storage/inmemory/inmemory_permanent.rs b/src/eth/storage/inmemory/inmemory_permanent.rs index fb2354537..4266d179a 100644 --- a/src/eth/storage/inmemory/inmemory_permanent.rs +++ b/src/eth/storage/inmemory/inmemory_permanent.rs @@ -8,7 +8,6 @@ use std::sync::RwLock; use std::sync::RwLockReadGuard; use std::sync::RwLockWriteGuard; -use async_trait::async_trait; use indexmap::IndexMap; use rand::rngs::StdRng; use rand::seq::IteratorRandom; @@ -131,7 +130,6 @@ impl Default for InMemoryPermanentStorage { } } -#[async_trait] impl PermanentStorage for InMemoryPermanentStorage { // ------------------------------------------------------------------------- // Block number operations diff --git a/src/eth/storage/inmemory/inmemory_temporary.rs b/src/eth/storage/inmemory/inmemory_temporary.rs index 8d3284780..14a4759cd 100644 --- a/src/eth/storage/inmemory/inmemory_temporary.rs +++ b/src/eth/storage/inmemory/inmemory_temporary.rs @@ -7,7 +7,6 @@ use std::sync::RwLockWriteGuard; use anyhow::Context; use anyhow::Ok; -use async_trait::async_trait; use nonempty::NonEmpty; use crate::eth::primitives::Account; @@ -113,7 +112,6 @@ impl InMemoryTemporaryAccount { } } -#[async_trait] impl TemporaryStorage for InMemoryTemporaryStorage { // ------------------------------------------------------------------------- // Accounts and Slots diff --git a/src/eth/storage/permanent_storage.rs b/src/eth/storage/permanent_storage.rs index 788f125cc..7ee623a51 100644 --- a/src/eth/storage/permanent_storage.rs +++ b/src/eth/storage/permanent_storage.rs @@ -1,5 +1,3 @@ -use async_trait::async_trait; - use crate::eth::primitives::Account; use crate::eth::primitives::Address; use crate::eth::primitives::Block; @@ -15,7 +13,6 @@ use crate::eth::primitives::StoragePointInTime; use crate::eth::primitives::TransactionMined; /// Permanent (committed) storage operations -#[async_trait] pub trait PermanentStorage: Send + Sync { // ------------------------------------------------------------------------- // Block number diff --git a/src/eth/storage/rocks/rocks_permanent.rs b/src/eth/storage/rocks/rocks_permanent.rs index d035c6238..f39453b2f 100644 --- a/src/eth/storage/rocks/rocks_permanent.rs +++ b/src/eth/storage/rocks/rocks_permanent.rs @@ -5,7 +5,6 @@ use std::sync::Arc; use std::thread; use anyhow::Context; -use async_trait::async_trait; use super::rocks_state::RocksStorageState; use super::types::AddressRocksdb; @@ -56,7 +55,6 @@ impl RocksPermanentStorage { } } -#[async_trait] impl PermanentStorage for RocksPermanentStorage { // ------------------------------------------------------------------------- // Block number operations diff --git a/src/eth/storage/temporary_storage.rs b/src/eth/storage/temporary_storage.rs index 4feba052f..960a5cd09 100644 --- a/src/eth/storage/temporary_storage.rs +++ b/src/eth/storage/temporary_storage.rs @@ -1,5 +1,3 @@ -use async_trait::async_trait; - use crate::eth::primitives::Account; use crate::eth::primitives::Address; use crate::eth::primitives::BlockNumber; @@ -12,7 +10,6 @@ use crate::eth::primitives::SlotIndex; use crate::eth::primitives::TransactionExecution; /// Temporary storage (in-between blocks) operations -#[async_trait] pub trait TemporaryStorage: Send + Sync { // ------------------------------------------------------------------------- // Block number