Struct solana_storage_bigtable::LedgerStorage
source · pub struct LedgerStorage {
pub(crate) connection: BigTableConnection,
}
Fields§
§connection: BigTableConnection
Implementations§
source§impl LedgerStorage
impl LedgerStorage
pub async fn new( read_only: bool, timeout: Option<Duration>, credential_path: Option<String> ) -> Result<Self>
pub fn new_for_emulator( instance_name: &str, app_profile_id: &str, endpoint: &str, timeout: Option<Duration> ) -> Result<Self>
pub async fn new_with_config(config: LedgerStorageConfig) -> Result<Self>
pub async fn new_with_stringified_credential(credential: String) -> Result<Self>
sourcepub async fn get_first_available_block(&self) -> Result<Option<Slot>>
pub async fn get_first_available_block(&self) -> Result<Option<Slot>>
Return the available slot that contains a block
sourcepub async fn get_confirmed_blocks(
&self,
start_slot: Slot,
limit: usize
) -> Result<Vec<Slot>>
pub async fn get_confirmed_blocks( &self, start_slot: Slot, limit: usize ) -> Result<Vec<Slot>>
Fetch the next slots after the provided slot that contains a block
start_slot: slot to start the search from (inclusive) limit: stop after this many slots have been found
pub async fn get_confirmed_blocks_with_data<'a>( &self, slots: &'a [Slot] ) -> Result<impl Iterator<Item = (Slot, ConfirmedBlock)> + 'a>
sourcepub async fn get_confirmed_block(&self, slot: Slot) -> Result<ConfirmedBlock>
pub async fn get_confirmed_block(&self, slot: Slot) -> Result<ConfirmedBlock>
Fetch the confirmed block from the desired slot
sourcepub async fn confirmed_block_exists(&self, slot: Slot) -> Result<bool>
pub async fn confirmed_block_exists(&self, slot: Slot) -> Result<bool>
Does the confirmed block exist in the Bigtable
pub async fn get_signature_status( &self, signature: &Signature ) -> Result<TransactionStatus>
pub async fn get_confirmed_transactions( &self, signatures: &[Signature] ) -> Result<Vec<ConfirmedTransactionWithStatusMeta>>
sourcepub async fn get_confirmed_transaction(
&self,
signature: &Signature
) -> Result<Option<ConfirmedTransactionWithStatusMeta>>
pub async fn get_confirmed_transaction( &self, signature: &Signature ) -> Result<Option<ConfirmedTransactionWithStatusMeta>>
Fetch a confirmed transaction
sourcepub async fn get_confirmed_signatures_for_address(
&self,
address: &Pubkey,
before_signature: Option<&Signature>,
until_signature: Option<&Signature>,
limit: usize
) -> Result<Vec<(ConfirmedTransactionStatusWithSignature, u32)>>
pub async fn get_confirmed_signatures_for_address( &self, address: &Pubkey, before_signature: Option<&Signature>, until_signature: Option<&Signature>, limit: usize ) -> Result<Vec<(ConfirmedTransactionStatusWithSignature, u32)>>
Get confirmed signatures for the provided address, in descending ledger order
address: address to search for before_signature: start with the first signature older than this one until_signature: end with the last signature more recent than this one limit: stop after this many signatures; if limit==0, all records in the table will be read
pub async fn upload_confirmed_block( &self, slot: Slot, confirmed_block: VersionedConfirmedBlock ) -> Result<()>
pub async fn delete_confirmed_block( &self, slot: Slot, dry_run: bool ) -> Result<()>
Trait Implementations§
source§impl Clone for LedgerStorage
impl Clone for LedgerStorage
source§fn clone(&self) -> LedgerStorage
fn clone(&self) -> LedgerStorage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for LedgerStorage
impl Send for LedgerStorage
impl Sync for LedgerStorage
impl Unpin for LedgerStorage
impl !UnwindSafe for LedgerStorage
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request