mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-08 03:01:12 -04:00
add doc_markdown clippy lint (#8552)
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@@ -66,16 +66,17 @@ pub struct BasicPayloadJobGenerator<Client, Pool, Tasks, Builder> {
|
||||
chain_spec: Arc<ChainSpec>,
|
||||
/// The type responsible for building payloads.
|
||||
///
|
||||
/// See [PayloadBuilder]
|
||||
/// See [`PayloadBuilder`]
|
||||
builder: Builder,
|
||||
/// Stored cached_reads for new payload jobs.
|
||||
/// Stored `cached_reads` for new payload jobs.
|
||||
pre_cached: Option<PrecachedState>,
|
||||
}
|
||||
|
||||
// === impl BasicPayloadJobGenerator ===
|
||||
|
||||
impl<Client, Pool, Tasks, Builder> BasicPayloadJobGenerator<Client, Pool, Tasks, Builder> {
|
||||
/// Creates a new [BasicPayloadJobGenerator] with the given config and custom [PayloadBuilder]
|
||||
/// Creates a new [`BasicPayloadJobGenerator`] with the given config and custom
|
||||
/// [`PayloadBuilder`]
|
||||
pub fn with_builder(
|
||||
client: Client,
|
||||
pool: Pool,
|
||||
@@ -214,9 +215,9 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// Pre-filled [CachedReads] for a specific block.
|
||||
/// Pre-filled [`CachedReads`] for a specific block.
|
||||
///
|
||||
/// This is extracted from the [CanonStateNotification] for the tip block.
|
||||
/// This is extracted from the [`CanonStateNotification`] for the tip block.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct PrecachedState {
|
||||
/// The block for which the state is pre-cached.
|
||||
@@ -246,7 +247,7 @@ impl PayloadTaskGuard {
|
||||
}
|
||||
}
|
||||
|
||||
/// Settings for the [BasicPayloadJobGenerator].
|
||||
/// Settings for the [`BasicPayloadJobGenerator`].
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct BasicPayloadJobGeneratorConfig {
|
||||
/// Data to include in the block's extra data field.
|
||||
@@ -255,7 +256,7 @@ pub struct BasicPayloadJobGeneratorConfig {
|
||||
interval: Duration,
|
||||
/// The deadline for when the payload builder job should resolve.
|
||||
///
|
||||
/// By default this is [SLOT_DURATION]: 12s
|
||||
/// By default this is [`SLOT_DURATION`]: 12s
|
||||
deadline: Duration,
|
||||
/// Maximum number of tasks to spawn for building a payload.
|
||||
max_payload_tasks: usize,
|
||||
@@ -341,7 +342,7 @@ where
|
||||
metrics: PayloadBuilderMetrics,
|
||||
/// The type responsible for building payloads.
|
||||
///
|
||||
/// See [PayloadBuilder]
|
||||
/// See [`PayloadBuilder`]
|
||||
builder: Builder,
|
||||
}
|
||||
|
||||
@@ -644,7 +645,7 @@ pub struct PayloadConfig<Attributes> {
|
||||
}
|
||||
|
||||
impl<Attributes> PayloadConfig<Attributes> {
|
||||
/// Returns an owned instance of the [PayloadConfig]'s extra_data bytes.
|
||||
/// Returns an owned instance of the [`PayloadConfig`]'s `extra_data` bytes.
|
||||
pub fn extra_data(&self) -> Bytes {
|
||||
self.extra_data.clone()
|
||||
}
|
||||
@@ -813,7 +814,7 @@ impl WithdrawalsOutcome {
|
||||
}
|
||||
}
|
||||
|
||||
/// Executes the withdrawals and commits them to the _runtime_ Database and BundleState.
|
||||
/// Executes the withdrawals and commits them to the _runtime_ Database and `BundleState`.
|
||||
///
|
||||
/// Returns the withdrawals root.
|
||||
///
|
||||
@@ -849,12 +850,12 @@ pub fn commit_withdrawals<DB: Database<Error = ProviderError>>(
|
||||
/// Apply the [EIP-4788](https://eips.ethereum.org/EIPS/eip-4788) pre block contract call.
|
||||
///
|
||||
/// This constructs a new [Evm] with the given DB, and environment
|
||||
/// ([CfgEnvWithHandlerCfg] and [BlockEnv]) to execute the pre block contract call.
|
||||
/// ([`CfgEnvWithHandlerCfg`] and [`BlockEnv`]) to execute the pre block contract call.
|
||||
///
|
||||
/// The parent beacon block root used for the call is gathered from the given
|
||||
/// [PayloadBuilderAttributes].
|
||||
/// [`PayloadBuilderAttributes`].
|
||||
///
|
||||
/// This uses [apply_beacon_root_contract_call] to ultimately apply the beacon root contract state
|
||||
/// This uses [`apply_beacon_root_contract_call`] to ultimately apply the beacon root contract state
|
||||
/// change.
|
||||
pub fn pre_block_beacon_root_contract_call<DB: Database + DatabaseCommit, Attributes>(
|
||||
db: &mut DB,
|
||||
@@ -892,9 +893,9 @@ where
|
||||
/// Apply the [EIP-7002](https://eips.ethereum.org/EIPS/eip-7002) post block contract call.
|
||||
///
|
||||
/// This constructs a new [Evm] with the given DB, and environment
|
||||
/// ([CfgEnvWithHandlerCfg] and [BlockEnv]) to execute the post block contract call.
|
||||
/// ([`CfgEnvWithHandlerCfg`] and [`BlockEnv`]) to execute the post block contract call.
|
||||
///
|
||||
/// This uses [apply_withdrawal_requests_contract_call] to ultimately calculate the
|
||||
/// This uses [`apply_withdrawal_requests_contract_call`] to ultimately calculate the
|
||||
/// [requests](Request).
|
||||
pub fn post_block_withdrawal_requests_contract_call<DB: Database + DatabaseCommit>(
|
||||
db: &mut DB,
|
||||
|
||||
Reference in New Issue
Block a user