mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix some typos (#6789)
This commit is contained in:
@ -451,7 +451,7 @@ where
|
|||||||
return propagated
|
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)
|
// number of connected peers)
|
||||||
let max_num_full = (self.peers.len() as f64).sqrt() as usize + 1;
|
let max_num_full = (self.peers.len() as f64).sqrt() as usize + 1;
|
||||||
|
|
||||||
|
|||||||
@ -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.
|
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).
|
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 {
|
) -> PropagatedTransactions {
|
||||||
let mut propagated = PropagatedTransactions::default();
|
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)
|
// number of connected peers)
|
||||||
let max_num_full = (self.peers.len() as f64).sqrt() as usize + 1;
|
let max_num_full = (self.peers.len() as f64).sqrt() as usize + 1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user