More SlotMeta docs (#3011)

This commit is contained in:
Greg Fitzgerald 2019-02-28 12:18:11 -07:00 committed by GitHub
parent d123d86d84
commit fec867539d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 7 deletions

View File

@ -123,20 +123,25 @@ pub trait LedgerColumnFamilyRaw {
#[derive(Clone, Debug, Default, Deserialize, Serialize, Eq, PartialEq)] #[derive(Clone, Debug, Default, Deserialize, Serialize, Eq, PartialEq)]
// The Meta column family // The Meta column family
pub struct SlotMeta { pub struct SlotMeta {
// The number of slots above the root (the genesis block). The first
// slot has slot_height 0.
pub slot_height: u64, pub slot_height: u64,
// The total number of consecutive blob starting from index 0 // The total number of consecutive blobs starting from index 0
// we have received for this slot. // we have received for this slot.
pub consumed: u64, pub consumed: u64,
// The entry height of the highest blob received for this slot. // The index *plus one* of the highest blob received for this slot. Useful
// for checking if the slot has received any blobs yet, and to calculate the
// range where there is one or more holes: `(consumed..received)`.
pub received: u64, pub received: u64,
// The index of the blob that is flagged as the last blob for this slot // The index of the blob that is flagged as the last blob for this slot.
pub last_index: u64, pub last_index: u64,
// The parent slot of this slot // The slot height of the block this one derives from.
pub parent_slot: u64, pub parent_slot: u64,
// The list of slots that chains to this slot // The list of slot heights, each of which contains a block that derives
// from this one.
pub next_slots: Vec<u64>, pub next_slots: Vec<u64>,
// True if every block from 0..slot, where slot is the slot index of this slot // True if this slot is full (consumed == last_index + 1) and if every
// is full // slot from 0..slot_height is also rooted.
pub is_rooted: bool, pub is_rooted: bool,
} }