pub struct CmpctBlockMessage {
pub header: BlockHeader,
pub nonce: u64,
pub short_ids: Vec<ShortTxId>,
pub prefilled_txs: Vec<PrefilledTransaction>,
}Expand description
CmpctBlock message - Compact block data (BIP152)
Fields§
§header: BlockHeaderBlock header
nonce: u64Nonce for short transaction ID calculation (SipHash key derivation)
short_ids: Vec<ShortTxId>Short transaction IDs (6 bytes each)
prefilled_txs: Vec<PrefilledTransaction>Prefilled transactions (transactions that are likely missing)
Trait Implementations§
Source§impl Clone for CmpctBlockMessage
impl Clone for CmpctBlockMessage
Source§fn clone(&self) -> CmpctBlockMessage
fn clone(&self) -> CmpctBlockMessage
Returns a duplicate 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 CmpctBlockMessage
impl Debug for CmpctBlockMessage
Source§impl From<&CmpctBlockMessage> for CompactBlock
impl From<&CmpctBlockMessage> for CompactBlock
Source§fn from(msg: &CmpctBlockMessage) -> Self
fn from(msg: &CmpctBlockMessage) -> Self
Converts to this type from the input type.
Source§impl From<CmpctBlockMessage> for CompactBlock
impl From<CmpctBlockMessage> for CompactBlock
Source§fn from(msg: CmpctBlockMessage) -> Self
fn from(msg: CmpctBlockMessage) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CmpctBlockMessage
impl PartialEq for CmpctBlockMessage
Source§impl TryFrom<CompactBlock> for CmpctBlockMessage
impl TryFrom<CompactBlock> for CmpctBlockMessage
Source§fn try_from(value: CompactBlock) -> Result<Self, Self::Error>
fn try_from(value: CompactBlock) -> Result<Self, Self::Error>
Builds a cmpctblock-shaped message from the integration crate::bip152::CompactBlock.
Prefilled entries are sorted by transaction index (required for BIP152 diff-encoding on the wire).
Witness stacks are not represented on crate::bip152::CompactBlock; prefilled txs use witness: None.
Source§type Error = CompactBlockWireConvertError
type Error = CompactBlockWireConvertError
The type returned in the event of a conversion error.
impl Eq for CmpctBlockMessage
impl StructuralPartialEq for CmpctBlockMessage
Auto Trait Implementations§
impl Freeze for CmpctBlockMessage
impl RefUnwindSafe for CmpctBlockMessage
impl Send for CmpctBlockMessage
impl Sync for CmpctBlockMessage
impl Unpin for CmpctBlockMessage
impl UnsafeUnpin for CmpctBlockMessage
impl UnwindSafe for CmpctBlockMessage
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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