Merge pull request #516 from stevenroose/max-inv-size

Add message::MAX_INV_SIZE constant
This commit is contained in:
Andrew Poelstra 2020-12-15 23:45:42 +00:00 committed by GitHub
commit c62cd98615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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::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>);