Skip to content

Commit

Permalink
Fix missing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
emhane committed Feb 22, 2024
1 parent 9feb4b1 commit 963012b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crates/net/eth-wire/src/types/broadcast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use alloy_rlp::{
Decodable, Encodable, RlpDecodable, RlpDecodableWrapper, RlpEncodable, RlpEncodableWrapper,
};

use derive_more::{Constructor, Deref, DerefMut, IntoIterator, From};
use derive_more::{Constructor, Deref, DerefMut, From, IntoIterator};
use reth_codecs::derive_arbitrary;
use reth_primitives::{
Block, Bytes, PooledTransactionsElement, TransactionSigned, TxHash, B256, U128,
Expand Down Expand Up @@ -656,7 +656,7 @@ impl<V> PartiallyValidData<V> {
}

/// Partially validated data from an announcement or a
[`PooledTransactions`](crate::PooledTransactions) response.
/// [`PooledTransactions`](crate::PooledTransactions) response.
#[derive(Debug, Deref, DerefMut, IntoIterator, From)]
#[from(PartiallyValidData<Eth68TxMetadata>)]
pub struct ValidAnnouncementData {
Expand Down
4 changes: 3 additions & 1 deletion crates/net/network/src/transactions/fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ impl TransactionFetcher {

self.remove_hashes_from_transaction_fetcher(fetched);
// buffer left over hashes
self.buffer_hashes_for_retry(requested_hashes, &peer_id);
self.try_buffer_hashes_for_retry(requested_hashes, &peer_id);

let transactions =
valid_payload.into_data().into_values().collect::<PooledTransactions>();
Expand Down Expand Up @@ -1096,11 +1096,13 @@ impl Future for GetPooledTxRequestFut {
}
}

/// Wrapper of unverified [`PooledTransactions`].
#[derive(Debug, Constructor, Deref)]
pub struct UnverifiedPooledTransactions {
txns: PooledTransactions,
}

/// [`PooledTransactions`] that have been successfully verified.
#[derive(Debug, Constructor)]
pub struct VerifiedPooledTransactions {
txns: PooledTransactions,
Expand Down
4 changes: 2 additions & 2 deletions crates/net/network/src/transactions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ where
fn on_new_pooled_transaction_hashes(
&mut self,
peer_id: PeerId,
mut msg: NewPooledTransactionHashes,
msg: NewPooledTransactionHashes,
cx: &mut Context<'_>,
) {
// If the node is initially syncing, ignore transactions
Expand Down Expand Up @@ -641,7 +641,7 @@ where
// most hashes will be filtered out here since this the mempool protocol is a gossip
// protocol, healthy peers will send many of the same hashes.
//
let already_known_by_pool = self.pool.retain_unknown(&mut msg);
let already_known_by_pool = self.pool.retain_unknown(&mut partially_valid_msg);
if let Some(intersection) = already_known_by_pool {
self.metrics.occurrences_hashes_already_in_pool.increment(intersection.len() as u64);
}
Expand Down

0 comments on commit 963012b

Please sign in to comment.