fix some typos (#6789)

This commit is contained in:
int88
2024-02-26 20:07:32 +08:00
committed by GitHub
parent 92396b39c4
commit 6930734a13
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;