pub struct Block {
pub height: Height,
pub parent_hash: BlockHash,
pub view: ViewNumber,
pub proposer: ValidatorId,
pub payload: Vec<u8>,
pub app_hash: BlockHash,
pub hash: BlockHash,
}Expand description
Block B_k := (b_k, h_{k-1})
Fields§
§height: Height§parent_hash: BlockHash§view: ViewNumber§proposer: ValidatorId§payload: Vec<u8>§app_hash: BlockHashApplication state root after executing the parent block.
Block N+1 carries the app_hash produced by execute_block(Block N).
This ties the state transition chain to the block chain, allowing nodes
to detect divergent application state before voting.
hash: BlockHashImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Block
impl<'de> Deserialize<'de> for Block
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnsafeUnpin 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