Fix branch (#14416)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
XxAlex74xX
2025-02-11 22:18:11 +01:00
committed by GitHub
parent fa2a571f8b
commit 77bd2115fb
5 changed files with 9 additions and 8 deletions

View File

@ -77,7 +77,8 @@ pub enum ListenerEvent {
}, },
/// Encountered an error when accepting a connection. /// Encountered an error when accepting a connection.
/// ///
/// This is non-fatal error as the listener continues to listen for new connections to accept. /// This is a non-fatal error as the listener continues to listen for new connections to
/// accept.
Error(io::Error), Error(io::Error),
} }

View File

@ -159,7 +159,7 @@ impl NetworkManager {
} }
impl<N: NetworkPrimitives> NetworkManager<N> { impl<N: NetworkPrimitives> NetworkManager<N> {
/// Sets the dedicated channel for events indented for the /// Sets the dedicated channel for events intended for the
/// [`TransactionsManager`](crate::transactions::TransactionsManager). /// [`TransactionsManager`](crate::transactions::TransactionsManager).
pub fn with_transactions( pub fn with_transactions(
mut self, mut self,
@ -169,21 +169,21 @@ impl<N: NetworkPrimitives> NetworkManager<N> {
self self
} }
/// Sets the dedicated channel for events indented for the /// Sets the dedicated channel for events intended for the
/// [`TransactionsManager`](crate::transactions::TransactionsManager). /// [`TransactionsManager`](crate::transactions::TransactionsManager).
pub fn set_transactions(&mut self, tx: mpsc::UnboundedSender<NetworkTransactionEvent<N>>) { pub fn set_transactions(&mut self, tx: mpsc::UnboundedSender<NetworkTransactionEvent<N>>) {
self.to_transactions_manager = self.to_transactions_manager =
Some(UnboundedMeteredSender::new(tx, NETWORK_POOL_TRANSACTIONS_SCOPE)); Some(UnboundedMeteredSender::new(tx, NETWORK_POOL_TRANSACTIONS_SCOPE));
} }
/// Sets the dedicated channel for events indented for the /// Sets the dedicated channel for events intended for the
/// [`EthRequestHandler`](crate::eth_requests::EthRequestHandler). /// [`EthRequestHandler`](crate::eth_requests::EthRequestHandler).
pub fn with_eth_request_handler(mut self, tx: mpsc::Sender<IncomingEthRequest<N>>) -> Self { pub fn with_eth_request_handler(mut self, tx: mpsc::Sender<IncomingEthRequest<N>>) -> Self {
self.set_eth_request_handler(tx); self.set_eth_request_handler(tx);
self self
} }
/// Sets the dedicated channel for events indented for the /// Sets the dedicated channel for events intended for the
/// [`EthRequestHandler`](crate::eth_requests::EthRequestHandler). /// [`EthRequestHandler`](crate::eth_requests::EthRequestHandler).
pub fn set_eth_request_handler(&mut self, tx: mpsc::Sender<IncomingEthRequest<N>>) { pub fn set_eth_request_handler(&mut self, tx: mpsc::Sender<IncomingEthRequest<N>>) {
self.to_eth_request_handler = Some(tx); self.to_eth_request_handler = Some(tx);

View File

@ -46,7 +46,7 @@ mod proto {
PongMessage(String), PongMessage(String),
} }
/// An protocol message, containing a message ID and payload. /// A protocol message, containing a message ID and payload.
#[derive(Clone, Debug, PartialEq, Eq)] #[derive(Clone, Debug, PartialEq, Eq)]
pub struct PingPongProtoMessage { pub struct PingPongProtoMessage {
pub message_type: PingPongProtoMessageId, pub message_type: PingPongProtoMessageId,

View File

@ -72,7 +72,7 @@ async fn test_4844_tx_gossip_penalization() {
let mut gen = TransactionGenerator::new(thread_rng()); let mut gen = TransactionGenerator::new(thread_rng());
// peer 0 will be penalised for sending txs[0] over gossip // peer 0 will be penalized for sending txs[0] over gossip
let txs = vec![gen.gen_eip4844_pooled(), gen.gen_eip1559_pooled()]; let txs = vec![gen.gen_eip4844_pooled(), gen.gen_eip1559_pooled()];
for tx in &txs { for tx in &txs {

View File

@ -18,7 +18,7 @@ use serde_with::{DeserializeFromStr, SerializeDisplay};
#[cfg(feature = "secp256k1")] #[cfg(feature = "secp256k1")]
use enr::Enr; use enr::Enr;
/// Represents a ENR in discovery. /// Represents an ENR in discovery.
/// ///
/// Note: this is only an excerpt of the [`NodeRecord`] data structure. /// Note: this is only an excerpt of the [`NodeRecord`] data structure.
#[derive( #[derive(