mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-02-19 03:04:27 -05:00
docs: fix typos and incorrect documentation (#20943)
This commit is contained in:
@@ -70,10 +70,11 @@ impl<T> Clone for UnboundedMeteredSender<T> {
|
||||
}
|
||||
}
|
||||
|
||||
/// A wrapper type around [Receiver](mpsc::UnboundedReceiver) that updates metrics on receive.
|
||||
/// A wrapper type around [`UnboundedReceiver`](mpsc::UnboundedReceiver) that updates metrics on
|
||||
/// receive.
|
||||
#[derive(Debug)]
|
||||
pub struct UnboundedMeteredReceiver<T> {
|
||||
/// The [Receiver](mpsc::UnboundedReceiver) that this wraps around
|
||||
/// The [`UnboundedReceiver`](mpsc::UnboundedReceiver) that this wraps around
|
||||
receiver: mpsc::UnboundedReceiver<T>,
|
||||
/// Holds metrics for this type
|
||||
metrics: MeteredReceiverMetrics,
|
||||
|
||||
@@ -637,7 +637,7 @@ impl<Pool: TransactionPool, N: NetworkPrimitives> TransactionsManager<Pool, N> {
|
||||
//
|
||||
// known txns have already been successfully fetched or received over gossip.
|
||||
//
|
||||
// most hashes will be filtered out here since this the mempool protocol is a gossip
|
||||
// most hashes will be filtered out here since the mempool protocol is a gossip
|
||||
// protocol, healthy peers will send many of the same hashes.
|
||||
//
|
||||
let hashes_count_pre_pool_filter = partially_valid_msg.len();
|
||||
|
||||
@@ -188,7 +188,7 @@ impl PruneModes {
|
||||
if let Some(PruneMode::Distance(limit)) = prune_mode {
|
||||
// check if distance exceeds the configured limit
|
||||
if distance > *limit {
|
||||
// but only if have haven't pruned the target yet, if we dont have a checkpoint
|
||||
// but only if we haven't pruned the target yet, if we don't have a checkpoint
|
||||
// yet, it's fully unpruned yet
|
||||
let pruned_height = checkpoint
|
||||
.and_then(|checkpoint| checkpoint.1.block_number)
|
||||
|
||||
@@ -1525,7 +1525,7 @@ impl TransportRpcModuleConfig {
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the [`RpcModuleSelection`] for the http transport.
|
||||
/// Sets the [`RpcModuleSelection`] for the ipc transport.
|
||||
pub fn with_ipc(mut self, ipc: impl Into<RpcModuleSelection>) -> Self {
|
||||
self.ipc = Some(ipc.into());
|
||||
self
|
||||
|
||||
@@ -19,7 +19,7 @@ impl MinerApiServer for MinerApi {
|
||||
Ok(false)
|
||||
}
|
||||
|
||||
fn set_gas_limit(&self, _gas_price: U128) -> RpcResult<bool> {
|
||||
fn set_gas_limit(&self, _gas_limit: U128) -> RpcResult<bool> {
|
||||
Ok(false)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ pub enum StageError {
|
||||
/// Database is ahead of static file data.
|
||||
#[error("missing static file data for block number: {number}", number = block.block.number)]
|
||||
MissingStaticFileData {
|
||||
/// Starting block with missing data.
|
||||
/// Starting block with missing data.
|
||||
block: Box<BlockWithParent>,
|
||||
/// Static File segment
|
||||
segment: StaticFileSegment,
|
||||
|
||||
@@ -32,7 +32,7 @@ pub enum DatabaseError {
|
||||
/// Failed to commit transaction changes into the database.
|
||||
#[error("failed to commit transaction changes: {_0}")]
|
||||
Commit(DatabaseErrorInfo),
|
||||
/// Failed to initiate a transaction.
|
||||
/// Failed to initialize a transaction.
|
||||
#[error("failed to initialize a transaction: {_0}")]
|
||||
InitTx(DatabaseErrorInfo),
|
||||
/// Failed to initialize a cursor.
|
||||
|
||||
@@ -183,7 +183,7 @@ impl ProviderError {
|
||||
other.downcast_ref()
|
||||
}
|
||||
|
||||
/// Returns true if the this type is a [`ProviderError::Other`] of that error
|
||||
/// Returns true if this type is a [`ProviderError::Other`] of that error
|
||||
/// type. Returns false otherwise.
|
||||
pub fn is_other<T: core::error::Error + 'static>(&self) -> bool {
|
||||
self.as_other().map(|err| err.is::<T>()).unwrap_or(false)
|
||||
|
||||
@@ -297,4 +297,4 @@ This chapter was packed with information, so let's do a quick review. The databa
|
||||
|
||||
# Next Chapter
|
||||
|
||||
[Next Chapter]()
|
||||
[Next Chapter](eth-wire.md)
|
||||
|
||||
Reference in New Issue
Block a user