pub struct BlockInfo {Show 22 fields
pub version: u32,
pub after_merge: bool,
pub before_split: bool,
pub after_split: bool,
pub want_split: bool,
pub want_merge: bool,
pub key_block: bool,
pub flags: u8,
pub seqno: u32,
pub vert_seqno: u32,
pub shard: ShardIdent,
pub gen_utime: u32,
pub start_lt: u64,
pub end_lt: u64,
pub gen_validator_list_hash_short: u32,
pub gen_catchain_seqno: u32,
pub min_ref_mc_seqno: u32,
pub prev_key_block_seqno: u32,
pub gen_software: GlobalVersion,
pub master_ref: Option<Lazy<BlockRef>>,
pub prev_ref: Cell,
pub prev_vert_ref: Option<Lazy<BlockRef>>,
}Expand description
Block info.
Fields§
§version: u32Block model version.
after_merge: boolWhether this block was produced after the shards were merged.
before_split: boolWhether this block was produced before the shards split.
after_split: boolWhether this block was produced after the shards split.
want_split: boolHint that the shard with this block should split.
want_merge: boolHint that the shard with this block should merge.
key_block: boolWhether this block is a key block.
flags: u8Block flags (currently only bit 1 is used, for gen_software)
seqno: u32Block sequence number.
vert_seqno: u32Block vertical sequence number.
shard: ShardIdentShard id where this block was produced.
gen_utime: u32Unix timestamp when the block was created.
start_lt: u64Logical time range start.
end_lt: u64Logical time range end.
gen_validator_list_hash_short: u32Last 4 bytes of the hash of the validator list.
gen_catchain_seqno: u32Seqno of the catchain session where this block was produced.
min_ref_mc_seqno: u32Minimal referenced seqno of the masterchain block.
prev_key_block_seqno: u32Previous key block seqno.
gen_software: GlobalVersionThe version and capabilities of the software that created this block.
master_ref: Option<Lazy<BlockRef>>Reference to the masterchain block which was used during the creation of this block.
prev_ref: CellReference to the previous block (or blocks).
prev_vert_ref: Option<Lazy<BlockRef>>Optional reference to the previous vertical block.
Implementations§
Source§impl BlockInfo
impl BlockInfo
Sourcepub fn set_gen_software(&mut self, gen_software: Option<GlobalVersion>)
pub fn set_gen_software(&mut self, gen_software: Option<GlobalVersion>)
Set the version and capabilities of the software that created this block.
Sourcepub fn load_master_ref(&self) -> Result<Option<BlockRef>, Error>
pub fn load_master_ref(&self) -> Result<Option<BlockRef>, Error>
Tries to load a reference to the masterchain block.
Sourcepub fn load_prev_ref(&self) -> Result<PrevBlockRef, Error>
pub fn load_prev_ref(&self) -> Result<PrevBlockRef, Error>
Tries to load a reference to the previous block (or blocks).
Sourcepub fn set_prev_ref(&mut self, prev_ref: &PrevBlockRef)
pub fn set_prev_ref(&mut self, prev_ref: &PrevBlockRef)
Set previous block reference.
Sourcepub fn set_prev_ref_single(&mut self, prev_ref: &BlockRef)
pub fn set_prev_ref_single(&mut self, prev_ref: &BlockRef)
Set previous block reference (direct).
Sourcepub fn set_prev_ref_after_merge(&mut self, left: &BlockRef, right: &BlockRef)
pub fn set_prev_ref_after_merge(&mut self, left: &BlockRef, right: &BlockRef)
Set previous block reference (split).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for BlockInfo
impl<'de> Deserialize<'de> for BlockInfo
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 Store for BlockInfo
impl Store for BlockInfo
Source§fn store_into(
&self,
builder: &mut CellBuilder,
context: &dyn CellContext,
) -> Result<(), Error>
fn store_into( &self, builder: &mut CellBuilder, context: &dyn CellContext, ) -> Result<(), Error>
impl Eq for BlockInfo
impl StructuralPartialEq for BlockInfo
Auto Trait Implementations§
impl Freeze for BlockInfo
impl !RefUnwindSafe for BlockInfo
impl Send for BlockInfo
impl Sync for BlockInfo
impl Unpin for BlockInfo
impl !UnwindSafe for BlockInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
self to key and returns true if they are equal.