pub struct Block {
pub global_id: i32,
pub info: Lazy<BlockInfo>,
pub value_flow: Lazy<ValueFlow>,
pub state_update: LazyExotic<MerkleUpdate>,
pub out_msg_queue_updates: Option<Dict<u32, LazyExotic<MerkleUpdate>>>,
pub extra: Lazy<BlockExtra>,
}Expand description
Shard block.
Fields§
§global_id: i32Global network id.
info: Lazy<BlockInfo>Block info.
value_flow: Lazy<ValueFlow>Tokens flow info.
state_update: LazyExotic<MerkleUpdate>Merkle update for the shard state.
out_msg_queue_updates: Option<Dict<u32, LazyExotic<MerkleUpdate>>>Merkle updates for the outgoing messages queue.
extra: Lazy<BlockExtra>Block content.
Implementations§
Source§impl Block
impl Block
Sourcepub fn load_value_flow(&self) -> Result<ValueFlow, Error>
pub fn load_value_flow(&self) -> Result<ValueFlow, Error>
Tries to load tokens flow info.
Sourcepub fn load_state_update(&self) -> Result<MerkleUpdate, Error>
pub fn load_state_update(&self) -> Result<MerkleUpdate, Error>
Tries to load state update.
Sourcepub fn load_extra(&self) -> Result<BlockExtra, Error>
pub fn load_extra(&self) -> Result<BlockExtra, Error>
Tries to load block content.
Sourcepub fn build_data_for_sign(block_id: &BlockId) -> [u8; 68]
pub fn build_data_for_sign(block_id: &BlockId) -> [u8; 68]
Builds a data for validators to sign.
Trait Implementations§
Source§impl Store for Block
impl Store for Block
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>
Tries to store itself into the cell builder.
impl Eq for Block
impl StructuralPartialEq for Block
Auto Trait Implementations§
impl Freeze for Block
impl !RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl !UnwindSafe for Block
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> 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
Compares
self to key and returns true if they are equal.