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