Struct floresta_chain::pruned_utreexo::udata::CompactLeafData
source · pub struct CompactLeafData {
pub header_code: u32,
pub amount: u64,
pub spk_ty: ScriptPubkeyType,
}
Expand description
Commitment of the leaf data, but in a compact way
The serialized format is:
[<header_code>
The serialized header code format is: bit 0 - containing transaction is a coinbase bits 1-x - height of the block that contains the spent txout
It’s calculated with: header_code = <<= 1 if IsCoinBase { header_code |= 1 // only set the bit 0 if it’s a coinbase. } ScriptPubkeyType is the output’s scriptPubkey, but serialized in a more efficient way to save bandwidth. If the type is recoverable from the scriptSig, don’t download the scriptPubkey.
Fields§
§header_code: u32
Header code tells the height of creating for this UTXO and whether it’s a coinbase
amount: u64
The amount locked in this UTXO
spk_ty: ScriptPubkeyType
The type of the locking script for this UTXO
Trait Implementations§
source§impl Clone for CompactLeafData
impl Clone for CompactLeafData
source§fn clone(&self) -> CompactLeafData
fn clone(&self) -> CompactLeafData
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 CompactLeafData
impl Debug for CompactLeafData
source§impl PartialEq<CompactLeafData> for CompactLeafData
impl PartialEq<CompactLeafData> for CompactLeafData
source§fn eq(&self, other: &CompactLeafData) -> bool
fn eq(&self, other: &CompactLeafData) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for CompactLeafData
impl StructuralEq for CompactLeafData
impl StructuralPartialEq for CompactLeafData
Auto Trait Implementations§
impl RefUnwindSafe for CompactLeafData
impl Send for CompactLeafData
impl Sync for CompactLeafData
impl Unpin for CompactLeafData
impl UnwindSafe for CompactLeafData
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