Struct ShardStateUnsplit

Source
pub struct ShardStateUnsplit {
Show 17 fields pub global_id: i32, pub shard_ident: ShardIdent, pub seqno: u32, pub vert_seqno: u32, pub gen_utime: u32, pub gen_lt: u64, pub min_ref_mc_seqno: u32, pub out_msg_queue_info: Cell, pub before_split: bool, pub accounts: Lazy<ShardAccounts>, pub overload_history: u64, pub underload_history: u64, pub total_balance: CurrencyCollection, pub total_validator_fees: CurrencyCollection, pub libraries: Dict<HashBytes, LibDescr>, pub master_ref: Option<BlockRef>, pub custom: Option<Lazy<McStateExtra>>,
}
Expand description

State of the single shard.

§TLB scheme

Old:

shard_state#9023afe2
    global_id:int32
    shard_id:ShardIdent
    seq_no:uint32 vert_seq_no:#
    gen_utime:uint32 gen_lt:uint64
    min_ref_mc_seqno:uint32
    out_msg_queue_info:^OutMsgQueueInfo
    before_split:(## 1)
    accounts:^ShardAccounts
    ^[
        overload_history:uint64
        underload_history:uint64
        total_balance:CurrencyCollection
        total_validator_fees:CurrencyCollection
        libraries:(HashmapE 256 LibDescr)
        master_ref:(Maybe BlkMasterInfo)
    ]
    custom:(Maybe ^McStateExtra)
    = ShardStateUnsplit;

New:

shard_state#9023aeee
    global_id:int32
    shard_id:ShardIdent
    seq_no:uint32 vert_seq_no:#
    gen_utime:uint32
    gen_utime_ms:uint16
    gen_lt:uint64
    min_ref_mc_seqno:uint32
    processed_upto:^ProcessedUptoInfo
    before_split:(## 1)
    accounts:^ShardAccounts
    ^[
        overload_history:uint64
        underload_history:uint64
        total_balance:CurrencyCollection
        total_validator_fees:CurrencyCollection
        libraries:(HashmapE 256 LibDescr)
        master_ref:(Maybe BlkMasterInfo)
    ]
    custom:(Maybe ^McStateExtra)
    = ShardStateUnsplit;

Fields§

§global_id: i32

Global network id.

§shard_ident: ShardIdent

Id of the shard.

§seqno: u32

Sequence number of the corresponding block.

§vert_seqno: u32

Vertical sequcent number of the corresponding block.

§gen_utime: u32

Unix timestamp when the block was created.

§gen_lt: u64

Logical time when the state was created.

§min_ref_mc_seqno: u32

Minimal referenced seqno of the masterchain block.

§out_msg_queue_info: Cell

Output messages queue info (stub).

§before_split: bool

Whether this state was produced before the shards split.

§accounts: Lazy<ShardAccounts>

Reference to the dictionary with shard accounts.

§overload_history: u64

Mask for the overloaded blocks.

§underload_history: u64

Mask for the underloaded blocks.

§total_balance: CurrencyCollection

Total balance for all currencies.

§total_validator_fees: CurrencyCollection

Total pending validator fees.

§libraries: Dict<HashBytes, LibDescr>

Dictionary with all libraries and its providers.

§master_ref: Option<BlockRef>

Optional reference to the masterchain block.

§custom: Option<Lazy<McStateExtra>>

Shard state additional info.

Implementations§

Source§

impl ShardStateUnsplit

Source

pub fn empty_shard_accounts() -> &'static Lazy<ShardAccounts>

Returns a static reference to the empty shard accounts.

Source

pub fn load_accounts(&self) -> Result<ShardAccounts, Error>

Tries to load shard accounts dictionary.

Source

pub fn load_custom(&self) -> Result<Option<McStateExtra>, Error>

Tries to load additional masterchain data.

Source

pub fn set_custom(&mut self, value: Option<&McStateExtra>) -> Result<(), Error>

Tries to set additional masterchain data.

Trait Implementations§

Source§

impl Clone for ShardStateUnsplit

Source§

fn clone(&self) -> ShardStateUnsplit

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for ShardStateUnsplit

Source§

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

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

impl Default for ShardStateUnsplit

Source§

fn default() -> Self

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

impl<'a> Load<'a> for ShardStateUnsplit

Source§

fn load_from(slice: &mut CellSlice<'a>) -> Result<Self, Error>

Tries to load itself from a cell slice.
Source§

impl PartialEq for ShardStateUnsplit

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Store for ShardStateUnsplit

Source§

fn store_into( &self, builder: &mut CellBuilder, context: &dyn CellContext, ) -> Result<(), Error>

Tries to store itself into the cell builder.
Source§

impl Eq for ShardStateUnsplit

Source§

impl StructuralPartialEq for ShardStateUnsplit

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

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

Source§

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

Compares self to key and returns true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.
Source§

impl<T> EquivalentRepr<T> for T