pub trait TipSource: Send + Sync {
// Required method
fn best_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = IndexerResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Provides the current best chain height for synchronization decisions.
Implementors should return the node’s best known height quickly and may cache internally to avoid excessive I/O.
Required Methods§
Sourcefn best_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = IndexerResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn best_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = IndexerResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Returns the current best height (tip) of the canonical chain.