pub struct UniversalBlock {
pub block_hash: BlockHash,
pub plh: PositionalLineageHash,
}Expand description
Per-block hashing result. PLH is self-contained for chain extension via
PositionalLineageHash::extend; no out-of-band tracking required.
Fields§
§block_hash: BlockHashXXH3 over the per-slot byte buffer of this block.
plh: PositionalLineageHashUniversal identifier; transport- and lookup-friendly. Carries the full u64 sequence hash inline.
Implementations§
Source§impl UniversalBlock
impl UniversalBlock
Sourcepub fn sequence_hash(&self) -> SequenceHash
pub fn sequence_hash(&self) -> SequenceHash
Parent-chained sequence hash for this block (full u64).
Sourcepub fn into_plh(self) -> PositionalLineageHash
pub fn into_plh(self) -> PositionalLineageHash
Lossy conversion: produces a PositionalLineageHash for transport / indexing.
Trait Implementations§
Source§impl Clone for UniversalBlock
impl Clone for UniversalBlock
Source§fn clone(&self) -> UniversalBlock
fn clone(&self) -> UniversalBlock
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UniversalBlock
impl Debug for UniversalBlock
Source§impl<'de> Deserialize<'de> for UniversalBlock
impl<'de> Deserialize<'de> for UniversalBlock
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
impl Eq for UniversalBlock
Source§impl From<&TokenBlock> for UniversalBlock
impl From<&TokenBlock> for UniversalBlock
Source§fn from(b: &TokenBlock) -> Self
fn from(b: &TokenBlock) -> Self
Converts to this type from the input type.
Source§impl PartialEq for UniversalBlock
impl PartialEq for UniversalBlock
Source§impl Serialize for UniversalBlock
impl Serialize for UniversalBlock
impl StructuralPartialEq for UniversalBlock
Auto Trait Implementations§
impl Freeze for UniversalBlock
impl RefUnwindSafe for UniversalBlock
impl Send for UniversalBlock
impl Sync for UniversalBlock
impl Unpin for UniversalBlock
impl UnsafeUnpin for UniversalBlock
impl UnwindSafe for UniversalBlock
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