Add message::MAX_INV_SIZE constant

This commit is contained in:
Steven Roose 2020-11-09 22:22:59 +00:00
parent 3f465d56eb
commit 1ec3ed3fec
No known key found for this signature in database
GPG Key ID: 2F2A88D7F8D68E87
1 changed files with 5 additions and 0 deletions

View File

@ -33,6 +33,11 @@ use consensus::encode::{CheckedData, Decodable, Encodable, VarInt};
use consensus::{encode, serialize}; use consensus::{encode, serialize};
use consensus::encode::MAX_VEC_SIZE; 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 /// Serializer for command string
#[derive(PartialEq, Eq, Clone, Debug)] #[derive(PartialEq, Eq, Clone, Debug)]
pub struct CommandString(Cow<'static, str>); pub struct CommandString(Cow<'static, str>);