From fa4ba442eb3fadbfc251438c5e4fa824c94a0d91 Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Thu, 19 Sep 2019 16:16:55 -0700 Subject: [PATCH] Add a MIN_VERSION constant to zebra_network. When we perform a handshake with a remote peer, we need to encode the version messages with a particular network version before we find out what the remote peer's version preference is. So in addition to having a CURRENT_VERSION constant (which represents our preference), we need to have a MIN_VERSION during the handshake (and later to determine whether we'll talk to the peer at all). --- zebra-network/src/constants.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zebra-network/src/constants.rs b/zebra-network/src/constants.rs index 8c23673e..7efea3aa 100644 --- a/zebra-network/src/constants.rs +++ b/zebra-network/src/constants.rs @@ -8,6 +8,9 @@ pub const USER_AGENT: &'static str = "Zebra v2.0.0-alpha.0"; /// The Zcash network protocol version used on mainnet. pub const CURRENT_VERSION: Version = Version(170_007); +/// The minimum version supported for peer connections. +pub const MIN_VERSION: Version = Version(170_007); + /// Magic numbers used to identify different Zcash networks. pub mod magics { use super::*;