Skip to content

Commit

Permalink
BIP152: Add basic Compact Block structures
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenroose authored and 0xB10C committed Jul 24, 2022
1 parent a9a39c4 commit f2fcdc8
Show file tree
Hide file tree
Showing 3 changed files with 423 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/consensus/encode.rs
Expand Up @@ -27,6 +27,7 @@ use crate::io::{self, Cursor, Read};

use crate::util::endian;
use crate::util::psbt;
use crate::util::bip152::{ShortId, PrefilledTransaction};
use crate::util::taproot::TapLeafHash;
use crate::hashes::hex::ToHex;

Expand Down Expand Up @@ -558,6 +559,7 @@ macro_rules! impl_array {

impl_array!(2);
impl_array!(4);
impl_array!(6);
impl_array!(8);
impl_array!(10);
impl_array!(12);
Expand Down Expand Up @@ -629,6 +631,9 @@ impl_vec!(TxIn);
impl_vec!(Vec<u8>);
impl_vec!(u64);
impl_vec!(TapLeafHash);
impl_vec!(VarInt);
impl_vec!(ShortId);
impl_vec!(PrefilledTransaction);

#[cfg(feature = "std")] impl_vec!(Inventory);
#[cfg(feature = "std")] impl_vec!((u32, Address));
Expand Down

0 comments on commit f2fcdc8

Please sign in to comment.