Skip to content

Commit 7122a31

Browse files
stevenroose0xB10C
authored andcommitted
BIP152: Add basic Compact Block structures
1 parent 455cefb commit 7122a31

File tree

3 files changed

+423
-0
lines changed

3 files changed

+423
-0
lines changed

src/consensus/encode.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ use crate::io::{self, Cursor, Read};
2727

2828
use crate::util::endian;
2929
use crate::util::psbt;
30+
use crate::util::bip152::{ShortId, PrefilledTransaction};
3031
use crate::util::taproot::TapLeafHash;
3132
use crate::hashes::hex::ToHex;
3233

@@ -558,6 +559,7 @@ macro_rules! impl_array {
558559

559560
impl_array!(2);
560561
impl_array!(4);
562+
impl_array!(6);
561563
impl_array!(8);
562564
impl_array!(10);
563565
impl_array!(12);
@@ -629,6 +631,9 @@ impl_vec!(TxIn);
629631
impl_vec!(Vec<u8>);
630632
impl_vec!(u64);
631633
impl_vec!(TapLeafHash);
634+
impl_vec!(VarInt);
635+
impl_vec!(ShortId);
636+
impl_vec!(PrefilledTransaction);
632637

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

0 commit comments

Comments
 (0)