From 89b9d93b020e86a215285abfecf6d8d4051c049b Mon Sep 17 00:00:00 2001 From: Jon Date: Thu, 8 Sep 2022 13:11:06 -0400 Subject: [PATCH 1/2] Fix derp network ver check.. ban old peers beyond MIP2 Height + 15000 blocks correction to ban message Signed-off-by: Jon --- src/net_processing.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 412fa4fc..8532f93c 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -2141,13 +2141,13 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr } } - if(::ChainActive().Tip()->nHeight >= chainparams.GetConsensus().MIP2Height){ - if (nVersion < MIN_PEER_PROTO_VERSION_AFTER_MIP2 + 15000) { + if(::ChainActive().Tip()->nHeight >= chainparams.GetConsensus().MIP2Height + 15000){ + if (nVersion < MIN_PEER_PROTO_VERSION_AFTER_MIP2) { // disconnect from peers older than this proto version LogPrint(BCLog::NET, "peer=%d using obsolete version after MIP2 fork %i; disconnecting\n", pfrom->GetId(), nVersion); if (enable_bip61) { connman->PushMessage(pfrom, CNetMsgMaker(INIT_PROTO_VERSION).Make(NetMsgType::REJECT, strCommand, REJECT_OBSOLETE, - strprintf("Version must be %d or greater after MIP2 fork", MIN_PEER_PROTO_VERSION_AFTER_MIP1))); + strprintf("Version must be %d or greater after MIP2 fork", MIN_PEER_PROTO_VERSION_AFTER_MIP2))); } pfrom->fDisconnect = true; return false; From ee6d3c302a1494ae0a623b561a964e20704fcaa5 Mon Sep 17 00:00:00 2001 From: Jon Date: Thu, 8 Sep 2022 13:17:04 -0400 Subject: [PATCH 2/2] increment version --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f3b3f1d2..652781f2 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 4) define(_CLIENT_VERSION_MINOR, 0) define(_CLIENT_VERSION_REVISION, 9) -define(_CLIENT_VERSION_BUILD, 0) +define(_CLIENT_VERSION_BUILD, 1) define(_CLIENT_VERSION_RC, 0) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2022)