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: TxoProof,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn remove_block<'life0, 'async_trait>(
&'life0 self,
proof: TxoProof,
prev_headers: Headers,
) -> 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: TxoProof,
) -> 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: TxoProof,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Add a block to the tracker