Struct solana_ledger::blockstore_meta::SlotMeta
source · pub struct SlotMeta {
pub slot: Slot,
pub consumed: u64,
pub received: u64,
pub first_shred_timestamp: u64,
pub last_index: Option<u64>,
pub parent_slot: Option<Slot>,
pub next_slots: Vec<Slot>,
pub connected_flags: ConnectedFlags,
pub completed_data_indexes: BTreeSet<u32>,
}
Expand description
The Meta column family
Fields§
§slot: Slot
The number of slots above the root (the genesis block). The first slot has slot 0.
consumed: u64
The total number of consecutive shreds starting from index 0 we have received for this slot. At the same time, it is also an index of the first missing shred for this slot, while the slot is incomplete.
received: u64
The index plus one of the highest shred received for this slot. Useful
for checking if the slot has received any shreds yet, and to calculate the
range where there is one or more holes: (consumed..received)
.
first_shred_timestamp: u64
The timestamp of the first time a shred was added for this slot
last_index: Option<u64>
The index of the shred that is flagged as the last shred for this slot. None until the shred with LAST_SHRED_IN_SLOT flag is received.
parent_slot: Option<Slot>
The slot height of the block this one derives from. The parent slot of the head of a detached chain of slots is None.
next_slots: Vec<Slot>
The list of slots, each of which contains a block that derives from this one.
connected_flags: ConnectedFlags
Connected status flags of this slot
completed_data_indexes: BTreeSet<u32>
Shreds indices which are marked data complete. That is, those that have the
ShredFlags::DATA_COMPLETE_SHRED
set.
Implementations§
source§impl SlotMeta
impl SlotMeta
pub fn is_full(&self) -> bool
sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Returns a boolean indicating whether the meta is connected.
sourcepub fn set_connected(&mut self)
pub fn set_connected(&mut self)
Mark the meta as connected.
sourcepub fn is_parent_connected(&self) -> bool
pub fn is_parent_connected(&self) -> bool
Returns a boolean indicating whether the meta’s parent is connected.
sourcepub fn set_parent_connected(&mut self) -> bool
pub fn set_parent_connected(&mut self) -> bool
Mark the meta’s parent as connected. If the meta is also full, the meta is now connected as well. Return a boolean indicating whether the meta becamed connected from this call.
sourcepub fn unset_parent(&mut self)
pub fn unset_parent(&mut self)
Dangerous. Currently only needed for a local-cluster test
pub fn clear_unconfirmed_slot(&mut self)
pub(crate) fn new(slot: Slot, parent_slot: Option<Slot>) -> Self
pub(crate) fn new_orphan(slot: Slot) -> Self
Trait Implementations§
source§impl<'de> Deserialize<'de> for SlotMeta
impl<'de> Deserialize<'de> for SlotMeta
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl PartialEq<SlotMeta> for SlotMeta
impl PartialEq<SlotMeta> for SlotMeta
impl Eq for SlotMeta
impl StructuralEq for SlotMeta
impl StructuralPartialEq for SlotMeta
Auto Trait Implementations§
impl RefUnwindSafe for SlotMeta
impl Send for SlotMeta
impl Sync for SlotMeta
impl Unpin for SlotMeta
impl UnwindSafe for SlotMeta
Blanket Implementations§
source§impl<T> AbiEnumVisitor for Twhere
T: Serialize + ?Sized,
impl<T> AbiEnumVisitor for Twhere T: Serialize + ?Sized,
default fn visit_for_abi( &self, _digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>
source§impl<T> AbiEnumVisitor for Twhere
T: Serialize + AbiExample + ?Sized,
impl<T> AbiEnumVisitor for Twhere T: Serialize + AbiExample + ?Sized,
default fn visit_for_abi( &self, digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>
source§impl<T> AbiEnumVisitor for Twhere
T: Serialize + ?Sized,
impl<T> AbiEnumVisitor for Twhere T: Serialize + ?Sized,
default fn visit_for_abi( &self, _digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>
source§impl<T> AbiEnumVisitor for Twhere
T: Serialize + AbiExample + ?Sized,
impl<T> AbiEnumVisitor for Twhere T: Serialize + AbiExample + ?Sized,
default fn visit_for_abi( &self, digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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>
T
in a tonic::Request