[−][src]Struct solana_ledger::blockstore::Blockstore
Fields
new_shreds_signals: Vec<SyncSender<bool>>
completed_slots_senders: Vec<SyncSender<Vec<Slot>>>
lowest_cleanup_slot: Arc<RwLock<u64>>
Methods
impl Blockstore
[src]
pub fn db(self) -> Arc<Database>
[src]
pub fn open(ledger_path: &Path) -> Result<Blockstore, BlockstoreError>
[src]
Opens a Ledger in directory, provides "infinite" window of shreds
pub fn open_with_signal(
ledger_path: &Path
) -> Result<(Self, Receiver<bool>, CompletedSlotsReceiver), BlockstoreError>
[src]
ledger_path: &Path
) -> Result<(Self, Receiver<bool>, CompletedSlotsReceiver), BlockstoreError>
pub fn destroy(ledger_path: &Path) -> Result<(), BlockstoreError>
[src]
pub fn meta(&self, slot: Slot) -> Result<Option<SlotMeta>, BlockstoreError>
[src]
pub fn is_full(&self, slot: Slot) -> bool
[src]
pub fn purge_slots(&self, from_slot: Slot, to_slot: Option<Slot>)
[src]
Silently deletes all blockstore column families starting at the given slot until the to
slot
Dangerous; Use with care:
Does not check for integrity and does not update slot metas that refer to deleted slots
Modifies multiple column families simultaneously
pub fn compact_storage(
&self,
from_slot: Slot,
to_slot: Slot
) -> Result<bool, BlockstoreError>
[src]
&self,
from_slot: Slot,
to_slot: Slot
) -> Result<bool, BlockstoreError>
pub fn erasure_meta(
&self,
slot: Slot,
set_index: u64
) -> Result<Option<ErasureMeta>, BlockstoreError>
[src]
&self,
slot: Slot,
set_index: u64
) -> Result<Option<ErasureMeta>, BlockstoreError>
pub fn orphan(&self, slot: Slot) -> Result<Option<bool>, BlockstoreError>
[src]
pub fn slot_meta_iterator<'a>(
&'a self,
slot: Slot
) -> Result<impl Iterator<Item = (u64, SlotMeta)> + 'a, BlockstoreError>
[src]
&'a self,
slot: Slot
) -> Result<impl Iterator<Item = (u64, SlotMeta)> + 'a, BlockstoreError>
pub fn live_slots_iterator<'a>(
&'a self,
root: Slot
) -> impl Iterator<Item = (Slot, SlotMeta)> + 'a
[src]
&'a self,
root: Slot
) -> impl Iterator<Item = (Slot, SlotMeta)> + 'a
pub fn slot_data_iterator<'a>(
&'a self,
slot: Slot
) -> Result<impl Iterator<Item = ((u64, u64), Box<[u8]>)> + 'a, BlockstoreError>
[src]
&'a self,
slot: Slot
) -> Result<impl Iterator<Item = ((u64, u64), Box<[u8]>)> + 'a, BlockstoreError>
pub fn slot_coding_iterator<'a>(
&'a self,
slot: Slot
) -> Result<impl Iterator<Item = ((u64, u64), Box<[u8]>)> + 'a, BlockstoreError>
[src]
&'a self,
slot: Slot
) -> Result<impl Iterator<Item = ((u64, u64), Box<[u8]>)> + 'a, BlockstoreError>
pub fn rooted_slot_iterator<'a>(
&'a self,
slot: Slot
) -> Result<impl Iterator<Item = u64> + 'a, BlockstoreError>
[src]
&'a self,
slot: Slot
) -> Result<impl Iterator<Item = u64> + 'a, BlockstoreError>
pub fn insert_shreds_handle_duplicate<F>(
&self,
shreds: Vec<Shred>,
leader_schedule: Option<&Arc<LeaderScheduleCache>>,
is_trusted: bool,
handle_duplicate: &F
) -> Result<BlockstoreInsertionMetrics, BlockstoreError> where
F: Fn(Shred),
[src]
&self,
shreds: Vec<Shred>,
leader_schedule: Option<&Arc<LeaderScheduleCache>>,
is_trusted: bool,
handle_duplicate: &F
) -> Result<BlockstoreInsertionMetrics, BlockstoreError> where
F: Fn(Shred),
pub fn insert_shreds(
&self,
shreds: Vec<Shred>,
leader_schedule: Option<&Arc<LeaderScheduleCache>>,
is_trusted: bool
) -> Result<BlockstoreInsertionMetrics, BlockstoreError>
[src]
&self,
shreds: Vec<Shred>,
leader_schedule: Option<&Arc<LeaderScheduleCache>>,
is_trusted: bool
) -> Result<BlockstoreInsertionMetrics, BlockstoreError>
pub fn get_data_shred(
&self,
slot: Slot,
index: u64
) -> Result<Option<Vec<u8>>, BlockstoreError>
[src]
&self,
slot: Slot,
index: u64
) -> Result<Option<Vec<u8>>, BlockstoreError>
pub fn get_data_shreds(
&self,
slot: Slot,
from_index: u64,
to_index: u64,
buffer: &mut [u8]
) -> Result<(u64, usize), BlockstoreError>
[src]
&self,
slot: Slot,
from_index: u64,
to_index: u64,
buffer: &mut [u8]
) -> Result<(u64, usize), BlockstoreError>
pub fn get_coding_shred(
&self,
slot: Slot,
index: u64
) -> Result<Option<Vec<u8>>, BlockstoreError>
[src]
&self,
slot: Slot,
index: u64
) -> Result<Option<Vec<u8>>, BlockstoreError>
pub fn write_entries(
&self,
start_slot: Slot,
num_ticks_in_start_slot: u64,
start_index: u32,
ticks_per_slot: u64,
parent: Option<u64>,
is_full_slot: bool,
keypair: &Arc<Keypair>,
entries: Vec<Entry>,
version: u16
) -> Result<usize, BlockstoreError>
[src]
&self,
start_slot: Slot,
num_ticks_in_start_slot: u64,
start_index: u32,
ticks_per_slot: u64,
parent: Option<u64>,
is_full_slot: bool,
keypair: &Arc<Keypair>,
entries: Vec<Entry>,
version: u16
) -> Result<usize, BlockstoreError>
pub fn get_index(&self, slot: Slot) -> Result<Option<Index>, BlockstoreError>
[src]
pub fn put_meta_bytes(
&self,
slot: Slot,
bytes: &[u8]
) -> Result<(), BlockstoreError>
[src]
&self,
slot: Slot,
bytes: &[u8]
) -> Result<(), BlockstoreError>
Manually update the meta for a slot. Can interfere with automatic meta update and potentially break chaining. Dangerous. Use with care.
pub fn find_missing_data_indexes(
&self,
slot: Slot,
first_timestamp: u64,
start_index: u64,
end_index: u64,
max_missing: usize
) -> Vec<u64>
[src]
&self,
slot: Slot,
first_timestamp: u64,
start_index: u64,
end_index: u64,
max_missing: usize
) -> Vec<u64>
pub fn get_block_time(
&self,
slot: Slot,
slot_duration: Duration,
stakes: &HashMap<Pubkey, (u64, Account)>
) -> Result<Option<UnixTimestamp>, BlockstoreError>
[src]
&self,
slot: Slot,
slot_duration: Duration,
stakes: &HashMap<Pubkey, (u64, Account)>
) -> Result<Option<UnixTimestamp>, BlockstoreError>
pub fn get_confirmed_block(
&self,
slot: Slot,
encoding: Option<RpcTransactionEncoding>
) -> Result<RpcConfirmedBlock, BlockstoreError>
[src]
&self,
slot: Slot,
encoding: Option<RpcTransactionEncoding>
) -> Result<RpcConfirmedBlock, BlockstoreError>
pub fn write_transaction_status(
&self,
index: (Slot, Signature),
status: &RpcTransactionStatus
) -> Result<(), BlockstoreError>
[src]
&self,
index: (Slot, Signature),
status: &RpcTransactionStatus
) -> Result<(), BlockstoreError>
pub fn write_rewards(
&self,
index: Slot,
rewards: RpcRewards
) -> Result<(), BlockstoreError>
[src]
&self,
index: Slot,
rewards: RpcRewards
) -> Result<(), BlockstoreError>
pub fn get_slot_entries(
&self,
slot: Slot,
shred_start_index: u64,
_max_entries: Option<u64>
) -> Result<Vec<Entry>, BlockstoreError>
[src]
&self,
slot: Slot,
shred_start_index: u64,
_max_entries: Option<u64>
) -> Result<Vec<Entry>, BlockstoreError>
Returns the entry vector for the slot starting with shred_start_index
pub fn get_slot_entries_with_shred_info(
&self,
slot: Slot,
start_index: u64
) -> Result<(Vec<Entry>, u64, bool), BlockstoreError>
[src]
&self,
slot: Slot,
start_index: u64
) -> Result<(Vec<Entry>, u64, bool), BlockstoreError>
Returns the entry vector for the slot starting with shred_start_index
, the number of
shreds that comprise the entry vector, and whether the slot is full (consumed all shreds).
pub fn get_slots_since(
&self,
slots: &[u64]
) -> Result<HashMap<u64, Vec<u64>>, BlockstoreError>
[src]
&self,
slots: &[u64]
) -> Result<HashMap<u64, Vec<u64>>, BlockstoreError>
pub fn is_root(&self, slot: Slot) -> bool
[src]
pub fn set_roots(&self, rooted_slots: &[u64]) -> Result<(), BlockstoreError>
[src]
pub fn is_dead(&self, slot: Slot) -> bool
[src]
pub fn set_dead_slot(&self, slot: Slot) -> Result<(), BlockstoreError>
[src]
pub fn store_duplicate_slot(
&self,
slot: Slot,
shred1: Vec<u8>,
shred2: Vec<u8>
) -> Result<(), BlockstoreError>
[src]
&self,
slot: Slot,
shred1: Vec<u8>,
shred2: Vec<u8>
) -> Result<(), BlockstoreError>
pub fn get_duplicate_slot(&self, slot: u64) -> Option<DuplicateSlotProof>
[src]
pub fn is_shred_duplicate(
&self,
slot: u64,
index: u32,
new_shred: &[u8]
) -> Option<Vec<u8>>
[src]
&self,
slot: u64,
index: u32,
new_shred: &[u8]
) -> Option<Vec<u8>>
pub fn has_duplicate_shreds_in_slot(&self, slot: Slot) -> bool
[src]
pub fn orphans_iterator<'a>(
&'a self,
slot: Slot
) -> Result<impl Iterator<Item = u64> + 'a, BlockstoreError>
[src]
&'a self,
slot: Slot
) -> Result<impl Iterator<Item = u64> + 'a, BlockstoreError>
pub fn prune(&self, target_slot: Slot)
[src]
Prune blockstore such that slots higher than target_slot
are deleted and all references to
higher slots are removed
pub fn last_root(&self) -> Slot
[src]
pub fn lowest_slot(&self) -> Slot
[src]
pub fn storage_size(&self) -> Result<u64, BlockstoreError>
[src]
Auto Trait Implementations
impl RefUnwindSafe for Blockstore
impl Send for Blockstore
impl Sync for Blockstore
impl Unpin for Blockstore
impl UnwindSafe for Blockstore
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,