chore: relax network blockreader trait bounds (#4079)

This commit is contained in:
Matthias Seitz
2023-08-05 16:00:05 +02:00
committed by GitHub
parent 544c51cc9f
commit cac4049a08
3 changed files with 6 additions and 7 deletions

View File

@ -42,7 +42,7 @@ use reth_metrics::common::mpsc::UnboundedMeteredSender;
use reth_net_common::bandwidth_meter::BandwidthMeter;
use reth_network_api::ReputationChangeKind;
use reth_primitives::{listener::EventListeners, ForkId, NodeRecord, PeerId, H256};
use reth_provider::BlockReader;
use reth_provider::{BlockNumReader, BlockReader};
use reth_rpc_types::{EthProtocolInfo, NetworkStatus};
use std::{
net::SocketAddr,
@ -156,7 +156,7 @@ impl<C> NetworkManager<C> {
impl<C> NetworkManager<C>
where
C: BlockReader,
C: BlockNumReader,
{
/// Creates the manager of a new network.
///

View File

@ -12,13 +12,12 @@ use crate::{
peers::{PeerAction, PeersManager},
FetchClient,
};
use reth_eth_wire::{
capability::Capabilities, BlockHashNumber, DisconnectReason, NewBlockHashes, Status,
};
use reth_network_api::PeerKind;
use reth_primitives::{ForkId, PeerId, H256};
use reth_provider::BlockReader;
use reth_provider::BlockNumReader;
use std::{
collections::{HashMap, VecDeque},
net::{IpAddr, SocketAddr},
@ -70,7 +69,7 @@ pub struct NetworkState<C> {
impl<C> NetworkState<C>
where
C: BlockReader,
C: BlockNumReader,
{
/// Create a new state instance with the given params
pub(crate) fn new(

View File

@ -12,7 +12,7 @@ use reth_eth_wire::{
DisconnectReason, EthVersion, Status,
};
use reth_primitives::PeerId;
use reth_provider::BlockReader;
use reth_provider::{BlockNumReader, BlockReader};
use std::{
io,
net::SocketAddr,
@ -77,7 +77,7 @@ pub(crate) struct Swarm<C> {
impl<C> Swarm<C>
where
C: BlockReader,
C: BlockNumReader,
{
/// Configures a new swarm instance.
pub(crate) fn new(