mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-20 19:11:08 +03:00
enable PIBD_HIST capability by default (#3500)
This commit is contained in:
parent
96afc766a1
commit
14f4683ca1
3 changed files with 7 additions and 7 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue