diff --git a/zebra-network/src/protocol/external/arbitrary.rs b/zebra-network/src/protocol/external/arbitrary.rs index a6d97401d57..9b175315cfe 100644 --- a/zebra-network/src/protocol/external/arbitrary.rs +++ b/zebra-network/src/protocol/external/arbitrary.rs @@ -91,4 +91,11 @@ impl Message { pub fn inv_strategy() -> BoxedStrategy { any::>().prop_map(Message::Inv).boxed() } + + /// Create a strategy that only generates [`Message::GetData`] messages. + pub fn get_data_strategy() -> BoxedStrategy { + any::>() + .prop_map(Message::GetData) + .boxed() + } }