From 1e892f23e6c33984225ee6006ba5391eef73fc90 Mon Sep 17 00:00:00 2001 From: Duke Date: Wed, 7 Aug 2024 07:18:08 -0700 Subject: [PATCH] Remove dead nVersion code This is very old code from the early days of Bitcoin, our mainnets have never used peer protocol version. Originally https://github.com/zcash/zcash/commit/150ab1d34c98096d28d4f7951a02516232f40ae2 --- src/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 475c1546b..ae5e27916 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6915,8 +6915,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, int nVersion; // use temporary for version, don't set version number until validated as connected const int minVersion = ishush3 ? MIN_HUSH_PEER_PROTO_VERSION : MIN_PEER_PROTO_VERSION; vRecv >> nVersion >> pfrom->nServices >> nTime >> addrMe; - if (nVersion == 10300) - nVersion = 300; + if (nVersion < minVersion) { // disconnect from peers older than this proto version