mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
Fix branch (#14416)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -77,7 +77,8 @@ pub enum ListenerEvent {
|
||||
},
|
||||
/// 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),
|
||||
}
|
||||
|
||||
|
||||
@ -159,7 +159,7 @@ impl NetworkManager {
|
||||
}
|
||||
|
||||
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).
|
||||
pub fn with_transactions(
|
||||
mut self,
|
||||
@ -169,21 +169,21 @@ impl<N: NetworkPrimitives> NetworkManager<N> {
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the dedicated channel for events indented for the
|
||||
/// Sets the dedicated channel for events intended for the
|
||||
/// [`TransactionsManager`](crate::transactions::TransactionsManager).
|
||||
pub fn set_transactions(&mut self, tx: mpsc::UnboundedSender<NetworkTransactionEvent<N>>) {
|
||||
self.to_transactions_manager =
|
||||
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).
|
||||
pub fn with_eth_request_handler(mut self, tx: mpsc::Sender<IncomingEthRequest<N>>) -> Self {
|
||||
self.set_eth_request_handler(tx);
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the dedicated channel for events indented for the
|
||||
/// Sets the dedicated channel for events intended for the
|
||||
/// [`EthRequestHandler`](crate::eth_requests::EthRequestHandler).
|
||||
pub fn set_eth_request_handler(&mut self, tx: mpsc::Sender<IncomingEthRequest<N>>) {
|
||||
self.to_eth_request_handler = Some(tx);
|
||||
|
||||
@ -46,7 +46,7 @@ mod proto {
|
||||
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)]
|
||||
pub struct PingPongProtoMessage {
|
||||
pub message_type: PingPongProtoMessageId,
|
||||
|
||||
@ -72,7 +72,7 @@ async fn test_4844_tx_gossip_penalization() {
|
||||
|
||||
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()];
|
||||
|
||||
for tx in &txs {
|
||||
|
||||
@ -18,7 +18,7 @@ use serde_with::{DeserializeFromStr, SerializeDisplay};
|
||||
#[cfg(feature = "secp256k1")]
|
||||
use enr::Enr;
|
||||
|
||||
/// Represents a ENR in discovery.
|
||||
/// Represents an ENR in discovery.
|
||||
///
|
||||
/// Note: this is only an excerpt of the [`NodeRecord`] data structure.
|
||||
#[derive(
|
||||
|
||||
Reference in New Issue
Block a user