pub struct McData {Show 17 fields
pub global_id: i32,
pub block_id: BlockId,
pub prev_key_block_seqno: u32,
pub gen_lt: u64,
pub gen_chain_time: u64,
pub libraries: Dict<HashBytes, LibDescr>,
pub total_validator_fees: CurrencyCollection,
pub global_balance: CurrencyCollection,
pub shards: Vec<(ShardIdent, ShardDescriptionShort)>,
pub config: BlockchainConfig,
pub validator_info: ValidatorInfo,
pub consensus_info: ConsensusInfo,
pub processed_upto: ProcessedUptoInfoStuff,
pub top_processed_to_anchor: MempoolAnchorId,
pub ref_mc_state_handle: RefMcStateHandle,
pub shards_processed_to_by_partitions: FastHashMap<ShardIdent, (bool, ProcessedToByPartitions)>,
pub prev_mc_data: Option<PrevMcData>,
}Fields§
§global_id: i32§block_id: BlockId§prev_key_block_seqno: u32Last known key block seqno. Will be equal to McData.block_id.seqno if it is a key block.
gen_lt: u64§gen_chain_time: u64§libraries: Dict<HashBytes, LibDescr>§total_validator_fees: CurrencyCollection§global_balance: CurrencyCollection§shards: Vec<(ShardIdent, ShardDescriptionShort)>§config: BlockchainConfig§validator_info: ValidatorInfo§consensus_info: ConsensusInfo§processed_upto: ProcessedUptoInfoStuff§top_processed_to_anchor: MempoolAnchorIdMinimal of top processed to anchors from master block and its top shards
ref_mc_state_handle: RefMcStateHandle§shards_processed_to_by_partitions: FastHashMap<ShardIdent, (bool, ProcessedToByPartitions)>§prev_mc_data: Option<PrevMcData>Previous McData. Can be None on start from persistent or zerostate.
Implementations§
Source§impl McData
impl McData
Sourcepub fn load_from_state(
state_stuff: &ShardStateStuff,
prev_mc_state: Option<&ShardStateStuff>,
all_shards_processed_to_by_partitions: FastHashMap<ShardIdent, (bool, ProcessedToByPartitions)>,
) -> Result<Arc<Self>>
pub fn load_from_state( state_stuff: &ShardStateStuff, prev_mc_state: Option<&ShardStateStuff>, all_shards_processed_to_by_partitions: FastHashMap<ShardIdent, (bool, ProcessedToByPartitions)>, ) -> Result<Arc<Self>>
Creates McData from mc state.
[all_shards_processed_to_by_partitions]: internals processed_to from master and all shards
pub fn make_block_ref(&self) -> BlockRef
pub fn lt_align(&self) -> u64
pub fn get_blocks_count_between_masters( &self, current_shard: &ShardIdent, ) -> u64
Trait Implementations§
Auto Trait Implementations§
impl Freeze for McData
impl !RefUnwindSafe for McData
impl Send for McData
impl Sync for McData
impl Unpin for McData
impl UnsafeUnpin for McData
impl !UnwindSafe for McData
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more