diff --git a/p2p/src/types.rs b/p2p/src/types.rs index 476a954e1..35248ad00 100644 --- a/p2p/src/types.rs +++ b/p2p/src/types.rs @@ -401,9 +401,7 @@ impl Default for Capabilities { | Capabilities::TXHASHSET_HIST | Capabilities::PEER_LIST | Capabilities::TX_KERNEL_HASH - - // To be enabled once we start supporting the various PIBD segment msgs. - // | Capabilities::PIBD_HIST + | Capabilities::PIBD_HIST } } diff --git a/p2p/tests/capabilities.rs b/p2p/tests/capabilities.rs index 1e179a4e9..5bdf7107a 100644 --- a/p2p/tests/capabilities.rs +++ b/p2p/tests/capabilities.rs @@ -41,6 +41,7 @@ fn default_capabilities() { assert!(x.contains(Capabilities::TXHASHSET_HIST)); assert!(x.contains(Capabilities::PEER_LIST)); assert!(x.contains(Capabilities::TX_KERNEL_HASH)); + assert!(x.contains(Capabilities::PIBD_HIST)); assert_eq!( x, @@ -48,5 +49,6 @@ fn default_capabilities() { | Capabilities::TXHASHSET_HIST | Capabilities::PEER_LIST | Capabilities::TX_KERNEL_HASH + | Capabilities::PIBD_HIST ); } diff --git a/p2p/tests/ser_deser.rs b/p2p/tests/ser_deser.rs index f341f60f8..70ba0583e 100644 --- a/p2p/tests/ser_deser.rs +++ b/p2p/tests/ser_deser.rs @@ -55,19 +55,19 @@ fn test_capabilities() { assert_eq!( expected, - p2p::types::Capabilities::from_bits_truncate(0b1111 as u32), + p2p::types::Capabilities::from_bits_truncate(0b11111 as u32), ); assert_eq!( expected, - p2p::types::Capabilities::from_bits_truncate(0b00001111 as u32), + p2p::types::Capabilities::from_bits_truncate(0b00011111 as u32), ); assert_eq!( expected, - p2p::types::Capabilities::from_bits_truncate(0b00101111 as u32), + p2p::types::Capabilities::from_bits_truncate(0b01011111 as u32), ); - assert!(p2p::types::Capabilities::from_bits_truncate(0b00101111 as u32).contains(expected)); + assert!(p2p::types::Capabilities::from_bits_truncate(0b01011111 as u32).contains(expected)); assert!( p2p::types::Capabilities::from_bits_truncate(0b00101111 as u32)