mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-30 20:57:10 +00:00
Rust 1.86.0 lints (#7254)
Implement lints for the new Rust compiler version 1.86.0.
This commit is contained in:
@@ -741,7 +741,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
///
|
||||
/// - `slot` always increases by `1`.
|
||||
/// - Skipped slots contain the root of the closest prior
|
||||
/// non-skipped slot (identical to the way they are stored in `state.block_roots`).
|
||||
/// non-skipped slot (identical to the way they are stored in `state.block_roots`).
|
||||
/// - Iterator returns `(Hash256, Slot)`.
|
||||
///
|
||||
/// Will return a `BlockOutOfRange` error if the requested start slot is before the period of
|
||||
@@ -805,7 +805,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
///
|
||||
/// - `slot` always decreases by `1`.
|
||||
/// - Skipped slots contain the root of the closest prior
|
||||
/// non-skipped slot (identical to the way they are stored in `state.block_roots`) .
|
||||
/// non-skipped slot (identical to the way they are stored in `state.block_roots`) .
|
||||
/// - Iterator returns `(Hash256, Slot)`.
|
||||
/// - The provided `block_root` is included as the first item in the iterator.
|
||||
pub fn rev_iter_block_roots_from(
|
||||
@@ -834,7 +834,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
/// - `slot` always decreases by `1`.
|
||||
/// - Iterator returns `(Hash256, Slot)`.
|
||||
/// - As this iterator starts at the `head` of the chain (viz., the best block), the first slot
|
||||
/// returned may be earlier than the wall-clock slot.
|
||||
/// returned may be earlier than the wall-clock slot.
|
||||
pub fn rev_iter_state_roots_from<'a>(
|
||||
&'a self,
|
||||
state_root: Hash256,
|
||||
|
||||
@@ -178,7 +178,7 @@ pub fn compute_proposer_duties_from_head<T: BeaconChainTypes>(
|
||||
/// - Returns an error if `state.current_epoch() > target_epoch`.
|
||||
/// - No-op if `state.current_epoch() == target_epoch`.
|
||||
/// - It must be the case that `state.canonical_root() == state_root`, but this function will not
|
||||
/// check that.
|
||||
/// check that.
|
||||
pub fn ensure_state_is_in_epoch<E: EthSpec>(
|
||||
state: &mut BeaconState<E>,
|
||||
state_root: Hash256,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
//! - Verification for gossip blocks (i.e., should we gossip some block from the network).
|
||||
//! - Verification for normal blocks (e.g., some block received on the RPC during a parent lookup).
|
||||
//! - Verification for chain segments (e.g., some chain of blocks received on the RPC during a
|
||||
//! sync).
|
||||
//! sync).
|
||||
//!
|
||||
//! The primary source of complexity here is that we wish to avoid doing duplicate work as a block
|
||||
//! moves through the verification process. For example, if some block is verified for gossip, we
|
||||
|
||||
@@ -33,7 +33,7 @@ pub struct CacheItem<E: EthSpec> {
|
||||
///
|
||||
/// - Produce an attestation without using `chain.canonical_head`.
|
||||
/// - Verify that a block root exists (i.e., will be imported in the future) during attestation
|
||||
/// verification.
|
||||
/// verification.
|
||||
/// - Provide a block which can be sent to peers via RPC.
|
||||
#[derive(Default)]
|
||||
pub struct EarlyAttesterCache<E: EthSpec> {
|
||||
|
||||
@@ -469,7 +469,7 @@ pub mod tests {
|
||||
let last_finalized_eth1 = eth1s_by_count
|
||||
.range(0..(finalized_deposits + 1))
|
||||
.map(|(_, eth1)| eth1)
|
||||
.last()
|
||||
.next_back()
|
||||
.cloned();
|
||||
assert_eq!(
|
||||
eth1cache.finalize(finalized_checkpoint),
|
||||
|
||||
Reference in New Issue
Block a user