Trait vls_frontend::ChainTrack
source · pub trait ChainTrack: Sync + Send {
// Required methods
fn log_prefix(&self) -> String;
fn id<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Vec<u8>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn heartbeat_pubkey<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = PublicKey> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn network(&self) -> Network;
fn tip_info<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = (u32, BlockHash)> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn forward_watches<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = (Vec<Txid>, Vec<OutPoint>)> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn reverse_watches<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = (Vec<Txid>, Vec<OutPoint>)> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn add_block<'life0, 'async_trait>(
&'life0 self,
header: BlockHeader,
proof: UnspentProof
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn remove_block<'life0, 'async_trait>(
&'life0 self,
proof: UnspentProof
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn beat<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = SignedHeartbeat> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
ChainTracker interface
Required Methods§
sourcefn log_prefix(&self) -> String
fn log_prefix(&self) -> String
Identity string for the log
sourcefn id<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Vec<u8>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn id<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Vec<u8>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Full identity
sourcefn heartbeat_pubkey<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = PublicKey> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn heartbeat_pubkey<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = PublicKey> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
The heartbeat public key
sourcefn tip_info<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = (u32, BlockHash)> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn tip_info<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = (u32, BlockHash)> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Return the block height and hash of specified node’s chaintracker tip
sourcefn forward_watches<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = (Vec<Txid>, Vec<OutPoint>)> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn forward_watches<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = (Vec<Txid>, Vec<OutPoint>)> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns all Txid and OutPoints to watch for in future blocks
sourcefn reverse_watches<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = (Vec<Txid>, Vec<OutPoint>)> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reverse_watches<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = (Vec<Txid>, Vec<OutPoint>)> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns all Txid and OutPoint watches used for prior blocks (used when removing)
sourcefn add_block<'life0, 'async_trait>(
&'life0 self,
header: BlockHeader,
proof: UnspentProof
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add_block<'life0, 'async_trait>( &'life0 self, header: BlockHeader, proof: UnspentProof ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Add a block to the tracker