refactor: Consensus trait error type (#13655)

This commit is contained in:
Tin Chung
2025-01-07 23:11:42 +07:00
committed by GitHub
parent b2c00418df
commit f7f2012156
33 changed files with 122 additions and 98 deletions

View File

@ -5,7 +5,7 @@ use alloy_consensus::BlockHeader;
use alloy_eips::BlockHashOrNumber;
use alloy_rpc_types_engine::{JwtError, JwtSecret};
use eyre::Result;
use reth_consensus::Consensus;
use reth_consensus::{Consensus, ConsensusError};
use reth_network_p2p::{
bodies::client::BodiesClient, headers::client::HeadersClient, priority::Priority,
};
@ -72,7 +72,7 @@ where
pub async fn get_single_body<H, Client>(
client: Client,
header: SealedHeader<H>,
consensus: impl Consensus<H, Client::Body>,
consensus: impl Consensus<H, Client::Body, Error = ConsensusError>,
) -> Result<SealedBlock<H, Client::Body>>
where
Client: BodiesClient,