Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More SlotMeta docs #3011

Merged
merged 3 commits into from
Feb 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions src/blocktree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,20 +123,25 @@ pub trait LedgerColumnFamilyRaw {
#[derive(Clone, Debug, Default, Deserialize, Serialize, Eq, PartialEq)]
// The Meta column family
pub struct SlotMeta {
// The number of slots above the root (the genesis block). The first
// slot has slot_height 0.
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.
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,
// 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,
// The parent slot of this slot
// The slot height of the block this one derives from.
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>,
// True if every block from 0..slot, where slot is the slot index of this slot
// is full
// True if this slot is full (consumed == last_index + 1) and if every
// slot from 0..slot_height is also rooted.
pub is_rooted: bool,
}

Expand Down