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

source

pub fn is_full(&self) -> bool

source

pub fn is_connected(&self) -> bool

Returns a boolean indicating whether the meta is connected.

source

pub fn set_connected(&mut self)

Mark the meta as connected.

source

pub fn is_parent_connected(&self) -> bool

Returns a boolean indicating whether the meta’s parent is connected.

source

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.

source

pub fn unset_parent(&mut self)

Dangerous. Currently only needed for a local-cluster test

source

pub fn clear_unconfirmed_slot(&mut self)

source

pub(crate) fn new(slot: Slot, parent_slot: Option<Slot>) -> Self

source

pub(crate) fn new_orphan(slot: Slot) -> Self

Trait Implementations§

source§

impl Clone for SlotMeta

source§

fn clone(&self) -> SlotMeta

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SlotMeta

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for SlotMeta

source§

fn default() -> SlotMeta

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for SlotMeta

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq<SlotMeta> for SlotMeta

source§

fn eq(&self, other: &SlotMeta) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SlotMeta

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for SlotMeta

source§

impl StructuralEq for SlotMeta

source§

impl StructuralPartialEq for SlotMeta

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> AbiEnumVisitor for Twhere T: Serialize + ?Sized,

source§

default fn visit_for_abi( &self, _digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>

source§

impl<T> AbiEnumVisitor for Twhere T: Serialize + AbiExample + ?Sized,

source§

default fn visit_for_abi( &self, digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>

source§

impl<T> AbiEnumVisitor for Twhere T: Serialize + ?Sized,

source§

default fn visit_for_abi( &self, _digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>

source§

impl<T> AbiEnumVisitor for Twhere T: Serialize + AbiExample + ?Sized,

source§

default fn visit_for_abi( &self, digester: &mut AbiDigester ) -> Result<AbiDigester, DigestError>

source§

impl<T> AbiExample for T

source§

default fn example() -> T

source§

impl<T> AbiExample for T

source§

default fn example() -> T

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for Twhere T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> TupleTree<T, ()> for T

§

const SIZE: Size = Size{ degree: 0, descendants: 0,}

§

fn descendants(_indirect_level: usize) -> usize

§

fn height() -> usize

§

fn preorder(self, f: &mut impl FnMut(Visit<T>))

§

fn preorder_with_size_hint(self, f: &mut impl FnMut(Visit<T>, Size))

§

fn postorder(self, f: &mut impl FnMut(Visit<T>))

§

fn postorder_with_size_hint(self, f: &mut impl FnMut(Visit<T>, Size))

§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,