pub trait TransactionStore: Send + Sync {
// Required methods
fn get_highest_beacon<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StdResult<Option<ChainPoint>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_highest_block_range<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StdResult<Option<BlockRange>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn store_transactions<'life0, 'async_trait>(
&'life0 self,
transactions: Vec<CardanoTransaction>,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_transactions_in_range<'life0, 'async_trait>(
&'life0 self,
range: Range<BlockNumber>,
) -> Pin<Box<dyn Future<Output = StdResult<Vec<CardanoTransaction>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn store_block_range_roots<'life0, 'async_trait>(
&'life0 self,
block_ranges: Vec<(BlockRange, MKTreeNode)>,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn remove_rolled_back_transactions_and_block_range<'life0, 'async_trait>(
&'life0 self,
slot_number: SlotNumber,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Cardano transactions store
Required Methods§
sourcefn get_highest_beacon<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StdResult<Option<ChainPoint>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_highest_beacon<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StdResult<Option<ChainPoint>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the highest known transaction beacon
sourcefn get_highest_block_range<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StdResult<Option<BlockRange>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_highest_block_range<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = StdResult<Option<BlockRange>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the highest stored block range root bounds
sourcefn store_transactions<'life0, 'async_trait>(
&'life0 self,
transactions: Vec<CardanoTransaction>,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn store_transactions<'life0, 'async_trait>(
&'life0 self,
transactions: Vec<CardanoTransaction>,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Store list of transactions
sourcefn get_transactions_in_range<'life0, 'async_trait>(
&'life0 self,
range: Range<BlockNumber>,
) -> Pin<Box<dyn Future<Output = StdResult<Vec<CardanoTransaction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transactions_in_range<'life0, 'async_trait>(
&'life0 self,
range: Range<BlockNumber>,
) -> Pin<Box<dyn Future<Output = StdResult<Vec<CardanoTransaction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get transactions in an interval of blocks
sourcefn store_block_range_roots<'life0, 'async_trait>(
&'life0 self,
block_ranges: Vec<(BlockRange, MKTreeNode)>,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn store_block_range_roots<'life0, 'async_trait>(
&'life0 self,
block_ranges: Vec<(BlockRange, MKTreeNode)>,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Store list of block ranges with their corresponding merkle root
sourcefn remove_rolled_back_transactions_and_block_range<'life0, 'async_trait>(
&'life0 self,
slot_number: SlotNumber,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove_rolled_back_transactions_and_block_range<'life0, 'async_trait>(
&'life0 self,
slot_number: SlotNumber,
) -> Pin<Box<dyn Future<Output = StdResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Remove transactions and block range roots that are in a rolled-back fork
- Remove transactions with slot number strictly greater than the given slot number
- Remove block range roots that have lower bound range strictly above the given slot number