#[non_exhaustive]pub struct BlockIdExt {
pub workchain: i32,
pub shard: u64,
pub seqno: u32,
pub root_hash: [u8; 32],
pub file_hash: [u8; 32],
}Expand description
The read response types, defined in ton-net-lite and surfaced here. A full block identifier: the id and its shard coordinates plus hashes.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.workchain: i32The workchain id, -1 for the masterchain.
shard: u64The shard prefix, 0x8000000000000000 for the masterchain.
seqno: u32The block sequence number, a height.
root_hash: [u8; 32]The block root hash.
file_hash: [u8; 32]The block file hash.
Implementations§
Source§impl BlockIdExt
impl BlockIdExt
Sourcepub fn new(
workchain: i32,
shard: u64,
seqno: u32,
root_hash: [u8; 32],
file_hash: [u8; 32],
) -> BlockIdExt
pub fn new( workchain: i32, shard: u64, seqno: u32, root_hash: [u8; 32], file_hash: [u8; 32], ) -> BlockIdExt
Names a block by its five identifying parts.
Reads hand these back, so a caller rarely builds one. The case that needs this is the one a verified read is for: an anchor block the caller learned somewhere other than from the server about to be checked. Without a way to name that block there is no way to check anything against it, and asking the server for its own anchor proves only that the server agrees with itself.
For a masterchain block, workchain is -1 and shard is 0x8000_0000_0000_0000.
Trait Implementations§
Source§impl Clone for BlockIdExt
impl Clone for BlockIdExt
Source§fn clone(&self) -> BlockIdExt
fn clone(&self) -> BlockIdExt
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BlockIdExt
impl Debug for BlockIdExt
impl Eq for BlockIdExt
Source§impl From<BlockIdExt> for BlockIdExt
impl From<BlockIdExt> for BlockIdExt
Source§fn from(wire: BlockIdExt) -> BlockIdExt
fn from(wire: BlockIdExt) -> BlockIdExt
The sequence number is a height, so it becomes unsigned crossing into the domain.