mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: add and fix more lints, improve docs (#4765)
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
use futures::Stream;
|
||||
use reth_provider::CanonChainTracker;
|
||||
use std::{
|
||||
fmt,
|
||||
pin::Pin,
|
||||
task::{ready, Context, Poll},
|
||||
time::Duration,
|
||||
@ -24,6 +25,12 @@ pub struct ConsensusLayerHealthEvents {
|
||||
canon_chain: Box<dyn CanonChainTracker>,
|
||||
}
|
||||
|
||||
impl fmt::Debug for ConsensusLayerHealthEvents {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("ConsensusLayerHealthEvents").field("interval", &self.interval).finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl ConsensusLayerHealthEvents {
|
||||
/// Creates a new [ConsensusLayerHealthEvents] with the given canonical chain tracker.
|
||||
pub fn new(canon_chain: Box<dyn CanonChainTracker>) -> Self {
|
||||
@ -78,7 +85,7 @@ impl Stream for ConsensusLayerHealthEvents {
|
||||
|
||||
/// Event that is triggered when Consensus Layer health is degraded from the
|
||||
/// Execution Layer point of view.
|
||||
#[derive(Debug)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
pub enum ConsensusLayerHealthEvent {
|
||||
/// Consensus Layer client was never seen.
|
||||
NeverSeen,
|
||||
|
||||
Reference in New Issue
Block a user