bitcoin/p2p/
message_compact_blocks.rs1use crate::bip152;
8use crate::internal_macros::impl_consensus_encoding;
9
10#[derive(PartialEq, Eq, Clone, Debug, Copy, PartialOrd, Ord, Hash)]
12pub struct SendCmpct {
13 pub send_compact: bool,
15 pub version: u64,
17}
18impl_consensus_encoding!(SendCmpct, send_compact, version);
19
20#[derive(PartialEq, Eq, Clone, Debug, PartialOrd, Ord, Hash)]
27pub struct CmpctBlock {
28 pub compact_block: bip152::HeaderAndShortIds,
30}
31impl_consensus_encoding!(CmpctBlock, compact_block);
32
33#[derive(PartialEq, Eq, Clone, Debug, PartialOrd, Ord, Hash)]
35pub struct GetBlockTxn {
36 pub txs_request: bip152::BlockTransactionsRequest,
38}
39impl_consensus_encoding!(GetBlockTxn, txs_request);
40
41#[derive(PartialEq, Eq, Clone, Debug, PartialOrd, Ord, Hash)]
43pub struct BlockTxn {
44 pub transactions: bip152::BlockTransactions,
46}
47impl_consensus_encoding!(BlockTxn, transactions);