pub struct LeafData {
pub block_hash: BlockHash,
pub prevout: OutPoint,
pub header_code: u32,
pub utxo: TxOut,
}Expand description
Leaf data is the data that is hashed when adding to utreexo state. It contains validation data and some commitments to make it harder to attack an utreexo-only node.
Fields§
§block_hash: BlockHashA commitment to the block creating this utxo
prevout: OutPointThe utxo’s outpoint
header_code: u32Header code is a compact commitment to the block height and whether or not this transaction is coinbase. It’s defined as
ⓘ
header_code: u32 = if transaction.is_coinbase() {
(block_height << 1 ) | 1
} else {
block_height << 1
};utxo: TxOutThe actual utxo
Implementations§
Source§impl LeafData
impl LeafData
pub fn _get_leaf_hashes(&self) -> Hash
Trait Implementations§
impl StructuralPartialEq for LeafData
Auto Trait Implementations§
impl Freeze for LeafData
impl RefUnwindSafe for LeafData
impl Send for LeafData
impl Sync for LeafData
impl Unpin for LeafData
impl UnwindSafe for LeafData
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more