chore: remove unnecessary async_trait usage (#5433)

This commit is contained in:
Roman Krasiuk
2023-11-15 04:15:37 -08:00
committed by GitHub
parent 352721370d
commit e109896dbe
5 changed files with 0 additions and 6 deletions

View File

@ -1,4 +1,3 @@
use async_trait::async_trait;
use reth_primitives::{
BlockHash, BlockNumber, GotExpected, GotExpectedBoxed, Header, InvalidTransactionError,
SealedBlock, SealedHeader, B256, U256,
@ -9,7 +8,6 @@ use std::fmt::Debug;
pub use reth_rpc_types::engine::ForkchoiceState;
/// Consensus is a protocol that chooses canonical chain.
#[async_trait]
#[auto_impl::auto_impl(&, Arc)]
pub trait Consensus: Debug + Send + Sync {
/// Validate if header is correct and follows consensus specification.

View File

@ -4,7 +4,6 @@ use crate::p2p::{
error::PeerRequestResult,
priority::Priority,
};
use async_trait::async_trait;
use futures::{future, Future, FutureExt};
use reth_primitives::{BlockBody, WithPeerId, B256};
use std::{

View File

@ -282,7 +282,6 @@ impl TestConsensus {
}
}
#[async_trait::async_trait]
impl Consensus for TestConsensus {
fn validate_header(&self, _header: &SealedHeader) -> Result<(), ConsensusError> {
if self.fail_validation() {

View File

@ -18,7 +18,6 @@ pub(crate) enum TestRunnerError {
}
/// A generic test runner for stages.
#[async_trait::async_trait]
pub(crate) trait StageTestRunner {
type S: Stage<DatabaseEnv> + 'static;

View File

@ -9,7 +9,6 @@ use crate::{
blobstore::InMemoryBlobStore, noop::MockTransactionValidator, Pool, PoolTransaction,
TransactionOrigin, TransactionValidationOutcome, TransactionValidator,
};
use async_trait::async_trait;
pub use gen::*;
pub use mock::*;
use std::{marker::PhantomData, sync::Arc};