From 6930734a13cc7b1f976487de8365f7a7bf37fe64 Mon Sep 17 00:00:00 2001 From: int88 <106391185+int88@users.noreply.github.com> Date: Mon, 26 Feb 2024 20:07:32 +0800 Subject: [PATCH] fix some typos (#6789) --- crates/net/network/src/transactions/mod.rs | 2 +- docs/crates/network.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/net/network/src/transactions/mod.rs b/crates/net/network/src/transactions/mod.rs index 7393ae993..b9d354c0f 100644 --- a/crates/net/network/src/transactions/mod.rs +++ b/crates/net/network/src/transactions/mod.rs @@ -451,7 +451,7 @@ where return propagated } - // send full transactions to a fraction fo the connected peers (square root of the total + // send full transactions to a fraction of the connected peers (square root of the total // number of connected peers) let max_num_full = (self.peers.len() as f64).sqrt() as usize + 1; diff --git a/docs/crates/network.md b/docs/crates/network.md index cc47f35d6..adcbc24b3 100644 --- a/docs/crates/network.md +++ b/docs/crates/network.md @@ -834,7 +834,7 @@ struct Peer { Note that the `Peer` struct contains a field `transactions`, which is an [LRU cache](https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU)) of the transactions this peer is aware of. -The `request_tx` field on the `Peer` is used at the sender end of a channel to send requests to the session with the peer. +The `request_tx` field on the `Peer` is used as the sender end of a channel to send requests to the session with the peer. After the `Peer` is added to `TransactionsManager.peers`, the hashes of all of the transactions in the node's transaction pool are sent to the peer in a [`NewPooledTransactionHashes` message](https://github.com/ethereum/devp2p/blob/master/caps/eth.md#newpooledtransactionhashes-0x08). @@ -911,7 +911,7 @@ fn propagate_transactions( ) -> PropagatedTransactions { let mut propagated = PropagatedTransactions::default(); - // send full transactions to a fraction fo the connected peers (square root of the total + // send full transactions to a fraction of the connected peers (square root of the total // number of connected peers) let max_num_full = (self.peers.len() as f64).sqrt() as usize + 1;