chore: fix typos (#7264)

This commit is contained in:
Alexey Shekhirin
2024-03-21 12:10:09 +00:00
committed by GitHub
parent 1a42b0929f
commit 0da7b7c314
8 changed files with 8 additions and 8 deletions

View File

@ -77,7 +77,7 @@ pub struct SessionManager {
secret_key: SecretKey, secret_key: SecretKey,
/// The `Status` message to send to peers. /// The `Status` message to send to peers.
status: Status, status: Status,
/// THe `HelloMessage` message to send to peers. /// The `HelloMessage` message to send to peers.
hello_message: HelloMessageWithProtocols, hello_message: HelloMessageWithProtocols,
/// The [`ForkFilter`] used to validate the peer's `Status` message. /// The [`ForkFilter`] used to validate the peer's `Status` message.
fork_filter: ForkFilter, fork_filter: ForkFilter,

View File

@ -1112,7 +1112,7 @@ where
} }
} }
/// Runs an operation to fetch hashes that are cached in in [`TransactionFetcher`]. /// Runs an operation to fetch hashes that are cached in [`TransactionFetcher`].
fn on_fetch_hashes_pending_fetch(&mut self) { fn on_fetch_hashes_pending_fetch(&mut self) {
// try drain transaction hashes pending fetch // try drain transaction hashes pending fetch
let info = &self.pending_pool_imports_info; let info = &self.pending_pool_imports_info;

View File

@ -81,7 +81,7 @@ impl StaticFileSegment {
format!("static_file_{}_{}_{}", self.as_ref(), block_range.start(), block_range.end()) format!("static_file_{}_{}_{}", self.as_ref(), block_range.start(), block_range.end())
} }
/// Returns file name for the provided segment and range, alongisde filters, compression. /// Returns file name for the provided segment and range, alongside filters, compression.
pub fn filename_with_configuration( pub fn filename_with_configuration(
&self, &self,
filters: Filters, filters: Filters,

View File

@ -340,7 +340,7 @@ impl PooledTransactionsElement {
} }
} }
/// Retruns true if the transaction is an EIP-4844 transaction. /// Returns true if the transaction is an EIP-4844 transaction.
#[inline] #[inline]
pub const fn is_eip4844(&self) -> bool { pub const fn is_eip4844(&self) -> bool {
matches!(self, Self::BlobTransaction(_)) matches!(self, Self::BlobTransaction(_))

View File

@ -389,7 +389,7 @@ mod tests {
let tx_receipt = executor.receipts[0][0].as_ref().unwrap(); let tx_receipt = executor.receipts[0][0].as_ref().unwrap();
let deposit_receipt = executor.receipts[0][1].as_ref().unwrap(); let deposit_receipt = executor.receipts[0][1].as_ref().unwrap();
// deposit_receipt_version is set to 1 for post canyon deposit transations // deposit_receipt_version is set to 1 for post canyon deposit transactions
assert_eq!(deposit_receipt.deposit_receipt_version, Some(1)); assert_eq!(deposit_receipt.deposit_receipt_version, Some(1));
assert!(tx_receipt.deposit_receipt_version.is_none()); assert!(tx_receipt.deposit_receipt_version.is_none());

View File

@ -613,7 +613,7 @@ mod tests {
} }
#[tokio::test] #[tokio::test]
/// Invalid block range (request is in in the future) /// Invalid block range (request is in the future)
async fn test_fee_history_invalid_block_range_in_future() { async fn test_fee_history_invalid_block_range_in_future() {
let block_count = 10; let block_count = 10;
let newest_block = 1337; let newest_block = 1337;

View File

@ -168,7 +168,7 @@ impl<DB: Database> Stage<DB> for StorageHashingStage {
return Ok(ExecOutput { checkpoint, done: false }) return Ok(ExecOutput { checkpoint, done: false })
} }
} else { } else {
// Aggregate all changesets and and make list of storages that have been // Aggregate all changesets and make list of storages that have been
// changed. // changed.
let lists = provider.changed_storages_with_range(from_block..=to_block)?; let lists = provider.changed_storages_with_range(from_block..=to_block)?;
// iterate over plain state and get newest storage value. // iterate over plain state and get newest storage value.

View File

@ -3,7 +3,7 @@
The `discv4` crate plays an important role in Reth, enabling discovery of other peers across the network. It is recommended to know how [Kademlia distributed hash tables](https://en.wikipedia.org/wiki/Kademlia) and [Ethereum's node discovery protocol](https://github.com/ethereum/devp2p/blob/master/discv4.md) work before reading through this chapter. While all concepts will be explained through the following sections, reading through the links above will make understanding this chapter much easier! With that note out of the way, lets jump into `disc4`. The `discv4` crate plays an important role in Reth, enabling discovery of other peers across the network. It is recommended to know how [Kademlia distributed hash tables](https://en.wikipedia.org/wiki/Kademlia) and [Ethereum's node discovery protocol](https://github.com/ethereum/devp2p/blob/master/discv4.md) work before reading through this chapter. While all concepts will be explained through the following sections, reading through the links above will make understanding this chapter much easier! With that note out of the way, lets jump into `disc4`.
## Starting the Node Discovery Protocol ## Starting the Node Discovery Protocol
As mentioned in the network and stages chapters, when the node is first started up, the `node::Command::execute()` function is called, which initializes the node and starts to run the Reth pipeline. Throughout the initialization of the node, there are many processes that are are started. One of the processes that is initialized is the p2p network which starts the node discovery protocol amongst other tasks. As mentioned in the network and stages chapters, when the node is first started up, the `node::Command::execute()` function is called, which initializes the node and starts to run the Reth pipeline. Throughout the initialization of the node, there are many processes that are started. One of the processes that is initialized is the p2p network which starts the node discovery protocol amongst other tasks.
[File: bin/reth/src/node/mod.rs](https://github.com/paradigmxyz/reth/blob/1563506aea09049a85e5cc72c2894f3f7a371581/bin/reth/src/node/mod.rs#L314-L322) [File: bin/reth/src/node/mod.rs](https://github.com/paradigmxyz/reth/blob/1563506aea09049a85e5cc72c2894f3f7a371581/bin/reth/src/node/mod.rs#L314-L322)
```rust ignore ```rust ignore