[−][src]Struct solana::blocktree::Blocktree
Fields
new_blobs_signals: Vec<SyncSender<bool>>
completed_slots_senders: Vec<SyncSender<Vec<u64>>>
Methods
impl Blocktree
[src]
pub fn open(ledger_path: &str) -> Result<Blocktree>
[src]
Opens a Ledger in directory, provides "infinite" window of blobs
pub fn open_with_signal(
ledger_path: &str
) -> Result<(Self, Receiver<bool>, CompletedSlotsReceiver)>
[src]
ledger_path: &str
) -> Result<(Self, Receiver<bool>, CompletedSlotsReceiver)>
pub fn destroy(ledger_path: &str) -> Result<()>
[src]
pub fn meta(&self, slot: u64) -> Result<Option<SlotMeta>>
[src]
pub fn is_full(&self, slot: u64) -> bool
[src]
pub fn erasure_meta(
&self,
slot: u64,
set_index: u64
) -> Result<Option<ErasureMeta>>
[src]
&self,
slot: u64,
set_index: u64
) -> Result<Option<ErasureMeta>>
pub fn orphan(&self, slot: u64) -> Result<Option<bool>>
[src]
pub fn rooted_slot_iterator<'a>(
&'a self,
slot: u64
) -> Result<RootedSlotIterator<'a>>
[src]
&'a self,
slot: u64
) -> Result<RootedSlotIterator<'a>>
pub fn slot_meta_iterator(
&self,
slot: u64
) -> Result<impl Iterator<Item = (u64, SlotMeta)>>
[src]
&self,
slot: u64
) -> Result<impl Iterator<Item = (u64, SlotMeta)>>
pub fn slot_data_iterator(
&self,
slot: u64
) -> Result<impl Iterator<Item = ((u64, u64), Box<[u8]>)>>
[src]
&self,
slot: u64
) -> Result<impl Iterator<Item = ((u64, u64), Box<[u8]>)>>
pub fn write_shared_blobs<I>(&self, shared_blobs: I) -> Result<()> where
I: IntoIterator,
I::Item: Borrow<SharedBlob>,
[src]
I: IntoIterator,
I::Item: Borrow<SharedBlob>,
pub fn write_blobs<I>(&self, blobs: I) -> Result<()> where
I: IntoIterator,
I::Item: Borrow<Blob>,
[src]
I: IntoIterator,
I::Item: Borrow<Blob>,
pub fn write_entries<I>(
&self,
start_slot: u64,
num_ticks_in_start_slot: u64,
start_index: u64,
ticks_per_slot: u64,
entries: I
) -> Result<()> where
I: IntoIterator,
I::Item: Borrow<Entry>,
[src]
&self,
start_slot: u64,
num_ticks_in_start_slot: u64,
start_index: u64,
ticks_per_slot: u64,
entries: I
) -> Result<()> where
I: IntoIterator,
I::Item: Borrow<Entry>,
pub fn insert_data_blobs<I>(&self, new_blobs: I) -> Result<()> where
I: IntoIterator,
I::Item: Borrow<Blob>,
[src]
I: IntoIterator,
I::Item: Borrow<Blob>,
pub fn read_blobs_bytes(
&self,
start_index: u64,
num_blobs: u64,
buf: &mut [u8],
slot: u64
) -> Result<(u64, u64)>
[src]
&self,
start_index: u64,
num_blobs: u64,
buf: &mut [u8],
slot: u64
) -> Result<(u64, u64)>
pub fn get_coding_blob_bytes(
&self,
slot: u64,
index: u64
) -> Result<Option<Vec<u8>>>
[src]
&self,
slot: u64,
index: u64
) -> Result<Option<Vec<u8>>>
pub fn delete_coding_blob(&self, slot: u64, index: u64) -> Result<()>
[src]
pub fn get_data_blob_bytes(
&self,
slot: u64,
index: u64
) -> Result<Option<Vec<u8>>>
[src]
&self,
slot: u64,
index: u64
) -> Result<Option<Vec<u8>>>
pub fn put_data_blob_bytes(
&self,
slot: u64,
index: u64,
bytes: &[u8]
) -> Result<()>
[src]
&self,
slot: u64,
index: u64,
bytes: &[u8]
) -> Result<()>
For benchmarks, testing, and setup. Does no metadata tracking. Use with care.
pub fn put_coding_blob_bytes_raw(
&self,
slot: u64,
index: u64,
bytes: &[u8]
) -> Result<()>
[src]
&self,
slot: u64,
index: u64,
bytes: &[u8]
) -> Result<()>
For benchmarks, testing, and setup. Does no metadata tracking. Use with care.
pub fn put_coding_blob_bytes(
&self,
slot: u64,
index: u64,
bytes: &[u8]
) -> Result<()>
[src]
&self,
slot: u64,
index: u64,
bytes: &[u8]
) -> Result<()>
this function will insert coding blobs and also automatically track erasure-related metadata. If recovery is available it will be done
pub fn put_many_coding_blob_bytes(
&self,
coding_blobs: &[SharedBlob]
) -> Result<()>
[src]
&self,
coding_blobs: &[SharedBlob]
) -> Result<()>
pub fn get_data_blob(&self, slot: u64, blob_index: u64) -> Result<Option<Blob>>
[src]
pub fn get_entries_bytes(
&self,
_start_index: u64,
_num_entries: u64,
_buf: &mut [u8]
) -> Result<(u64, u64)>
[src]
&self,
_start_index: u64,
_num_entries: u64,
_buf: &mut [u8]
) -> Result<(u64, u64)>
pub fn find_missing_data_indexes(
&self,
slot: u64,
start_index: u64,
end_index: u64,
max_missing: usize
) -> Vec<u64>
[src]
&self,
slot: u64,
start_index: u64,
end_index: u64,
max_missing: usize
) -> Vec<u64>
pub fn get_slot_entries(
&self,
slot: u64,
blob_start_index: u64,
max_entries: Option<u64>
) -> Result<Vec<Entry>>
[src]
&self,
slot: u64,
blob_start_index: u64,
max_entries: Option<u64>
) -> Result<Vec<Entry>>
Returns the entry vector for the slot starting with blob_start_index
pub fn read_ledger_blobs(&self) -> impl Iterator<Item = Blob> + '_
[src]
pub fn read_ledger(&self) -> Result<impl Iterator<Item = Entry>>
[src]
Return an iterator for all the entries in the given file.
pub fn get_slot_entries_with_blob_count(
&self,
slot: u64,
blob_start_index: u64,
max_entries: Option<u64>
) -> Result<(Vec<Entry>, usize)>
[src]
&self,
slot: u64,
blob_start_index: u64,
max_entries: Option<u64>
) -> Result<(Vec<Entry>, usize)>
pub fn get_slots_since(&self, slots: &[u64]) -> Result<HashMap<u64, Vec<u64>>>
[src]
pub fn deserialize_blob_data(data: &[u8]) -> Result<Vec<Entry>>
[src]
pub fn is_root(&self, slot: u64) -> bool
[src]
pub fn set_roots(&self, rooted_slots: &[u64]) -> Result<()>
[src]
pub fn is_dead(&self, slot: u64) -> bool
[src]
pub fn set_dead_slot(&self, slot: u64) -> Result<()>
[src]
pub fn get_orphans(&self, max: Option<usize>) -> Vec<u64>
[src]
Auto Trait Implementations
impl Send for Blocktree
impl Unpin for Blocktree
impl Sync for Blocktree
impl UnwindSafe for Blocktree
impl RefUnwindSafe for Blocktree
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,