Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove unnecessary async_trait usage #5433

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions crates/interfaces/src/consensus.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use async_trait::async_trait;
use reth_primitives::{
BlockHash, BlockNumber, GotExpected, GotExpectedBoxed, Header, InvalidTransactionError,
SealedBlock, SealedHeader, B256, U256,
Expand All @@ -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.
Expand Down
1 change: 0 additions & 1 deletion crates/interfaces/src/test_utils/bodies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
1 change: 0 additions & 1 deletion crates/interfaces/src/test_utils/headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
1 change: 0 additions & 1 deletion crates/stages/src/test_utils/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion crates/transaction-pool/src/test_utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down