From e9b0a54f031e478fa3b4983ac7b35ef9854bc2f5 Mon Sep 17 00:00:00 2001 From: myriadcoin Date: Sun, 2 Nov 2014 19:59:57 +0200 Subject: [PATCH 1/2] Checkpoint --- src/checkpoints.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp index c652f478..ee13ab93 100644 --- a/src/checkpoints.cpp +++ b/src/checkpoints.cpp @@ -51,11 +51,12 @@ namespace Checkpoints (490168, uint256("0x000000000000155ce9845e501617f152127e32c2c468edc643809f9988d30327")) (557719, uint256("0x0000000000000851f690d42129b34408697c88316879debd413049959517d7c6")) (740001, uint256("0x00000000000002c7aaa3ad688eb5af7d2779f4aa1d9a1b9a5c3cfb4ccad56caa")) + (740576, uint256("0x00000000000043dc047538e724f17a388146f22dd2ecf66f3c88253799912f4d")) ; static const CCheckpointData data = { &mapCheckpoints, - 1414924547, // * UNIX timestamp of last checkpoint block - 2204626, // * total number of transactions between genesis and last checkpoint + 1414949371, // * UNIX timestamp of last checkpoint block + 2215008, // * total number of transactions between genesis and last checkpoint // (the tx=... number in the SetBestChain debug.log lines) 2880 // * estimated number of transactions per day after checkpoint }; From e73ca065c00c16f58edd5b8928c69fab77f3b932 Mon Sep 17 00:00:00 2001 From: myriadcoin Date: Mon, 3 Nov 2014 16:47:42 +0200 Subject: [PATCH 2/2] Reject pre-fork sub versions --- src/main.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 32a980b5..5b5f1f83 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3561,6 +3561,35 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) if (!vRecv.empty()) { vRecv >> pfrom->strSubVer; pfrom->cleanSubVer = SanitizeString(pfrom->strSubVer); + + if ( + (pfrom->cleanSubVer == "/Satoshi:0.8.99.1/") || + (pfrom->cleanSubVer == "/Satoshi:0.8.99.2/") || + (pfrom->cleanSubVer == "/Satoshi:0.8.99.3/") || + (pfrom->cleanSubVer == "/Satoshi:0.8.99.4/") || + (pfrom->cleanSubVer == "/Satoshi:0.8.99.5/") || + (pfrom->cleanSubVer == "/Satoshi:0.8.99.6/") || + (pfrom->cleanSubVer == "/Satoshi:0.8.99.7/") || + (pfrom->cleanSubVer == "/Satoshi:0.8.99.8/") || + (pfrom->cleanSubVer == "/Satoshi:0.8.99.9/") || + (pfrom->cleanSubVer == "/Satoshi:0.8.99.10/") || + (pfrom->cleanSubVer == "/Satoshi:0.8.99.11/") || + (pfrom->cleanSubVer == "/Satoshi:0.8.99.12/") || + (pfrom->cleanSubVer == "/Satoshi:0.9.2.1/") || + (pfrom->cleanSubVer == "/Satoshi:0.9.2.2/") || + (pfrom->cleanSubVer == "/Satoshi:0.9.2.3/") || + (pfrom->cleanSubVer == "/Satoshi:0.9.2.4/") || + (pfrom->cleanSubVer == "/Satoshi:0.9.2.5/") + ) + { + // disconnect from peers older than this proto version + LogPrintf("partner %s using obsolete sub version %s; disconnecting\n", pfrom->addr.ToString(), pfrom->cleanSubVer); + pfrom->PushMessage("reject", strCommand, REJECT_OBSOLETE, + strprintf("Version must be %d or greater", MIN_PEER_PROTO_VERSION)); + pfrom->fDisconnect = true; + return false; + } + } if (!vRecv.empty()) vRecv >> pfrom->nStartingHeight;