Struct grin_core::core::transaction::NRDRelativeHeight
source · pub struct NRDRelativeHeight(/* private fields */);
Expand description
Relative height field on NRD kernel variant. u16 representing a height between 1 and MAX (consensus::WEEK_HEIGHT).
Implementations§
Trait Implementations§
source§impl Clone for NRDRelativeHeight
impl Clone for NRDRelativeHeight
source§fn clone(&self) -> NRDRelativeHeight
fn clone(&self) -> NRDRelativeHeight
Returns a copy of the value. Read more
1.0.0 · 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 NRDRelativeHeight
impl Debug for NRDRelativeHeight
source§impl<'de> Deserialize<'de> for NRDRelativeHeight
impl<'de> Deserialize<'de> for NRDRelativeHeight
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
source§impl From<NRDRelativeHeight> for u64
impl From<NRDRelativeHeight> for u64
source§fn from(height: NRDRelativeHeight) -> Self
fn from(height: NRDRelativeHeight) -> Self
Converts to this type from the input type.
source§impl PartialEq for NRDRelativeHeight
impl PartialEq for NRDRelativeHeight
source§fn eq(&self, other: &NRDRelativeHeight) -> bool
fn eq(&self, other: &NRDRelativeHeight) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Readable for NRDRelativeHeight
impl Readable for NRDRelativeHeight
source§impl Serialize for NRDRelativeHeight
impl Serialize for NRDRelativeHeight
source§impl TryFrom<u16> for NRDRelativeHeight
impl TryFrom<u16> for NRDRelativeHeight
Conversion from a u16 to a valid NRDRelativeHeight. Valid height is between 1 and WEEK_HEIGHT inclusive.
source§impl TryFrom<u64> for NRDRelativeHeight
impl TryFrom<u64> for NRDRelativeHeight
source§impl Writeable for NRDRelativeHeight
impl Writeable for NRDRelativeHeight
impl Copy for NRDRelativeHeight
impl DefaultHashable for NRDRelativeHeight
impl StructuralPartialEq for NRDRelativeHeight
Auto Trait Implementations§
impl Freeze for NRDRelativeHeight
impl RefUnwindSafe for NRDRelativeHeight
impl Send for NRDRelativeHeight
impl Sync for NRDRelativeHeight
impl Unpin for NRDRelativeHeight
impl UnwindSafe for NRDRelativeHeight
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<D> Hashed for Dwhere
D: DefaultHashable,
impl<D> Hashed for Dwhere
D: DefaultHashable,
source§impl<T> PMMRIndexHashable for Twhere
T: DefaultHashable,
impl<T> PMMRIndexHashable for Twhere
T: DefaultHashable,
source§fn hash_with_index(&self, index: u64) -> Hash
fn hash_with_index(&self, index: u64) -> Hash
Hash with a given index
source§impl<H> ShortIdentifiable for Hwhere
H: Hashed,
impl<H> ShortIdentifiable for Hwhere
H: Hashed,
source§fn short_id(&self, hash: &Hash, nonce: u64) -> ShortId
fn short_id(&self, hash: &Hash, nonce: u64) -> ShortId
Generate a short_id via the following -
- extract k0/k1 from block_hash hashed with the nonce (first two u64
values) * initialize a siphasher24 with k0/k1
- self.hash() passing in the siphasher24 instance
- drop the 2 most significant bytes (to return a 6 byte short_id)