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).
This commit is contained in:
Henry de Valence 2019-09-19 16:16:55 -07:00
parent 34c026ccca
commit 3f3889fef0
1 changed files with 3 additions and 0 deletions

View File

@ -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::*;