From 1ec3ed3fec07ea22209c5504c5c2155d482ef596 Mon Sep 17 00:00:00 2001 From: Steven Roose Date: Mon, 9 Nov 2020 22:22:59 +0000 Subject: [PATCH] Add message::MAX_INV_SIZE constant --- src/network/message.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/network/message.rs b/src/network/message.rs index 5b045cef..e68dbb61 100644 --- a/src/network/message.rs +++ b/src/network/message.rs @@ -33,6 +33,11 @@ use consensus::encode::{CheckedData, Decodable, Encodable, VarInt}; use consensus::{encode, serialize}; use consensus::encode::MAX_VEC_SIZE; +/// The maximum number of [Inventory] items in an `inv` message. +/// +/// This limit is not currently enforced by this implementation. +pub const MAX_INV_SIZE: usize = 50_000; + /// Serializer for command string #[derive(PartialEq, Eq, Clone, Debug)] pub struct CommandString(Cow<'static, str>);