From 89fb42ed4c8e9f1cd4f08e60d6a676834102f9e1 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Mon, 15 Apr 2013 02:03:25 +0000 Subject: [PATCH 1/3] Revert "Require startingheight >= 230000" This reverts commit e4330f9be4195c92cf74bba1e67583f0901b5e9b. --- bitcoin.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bitcoin.cpp b/bitcoin.cpp index d0a8bcf..beeecea 100644 --- a/bitcoin.cpp +++ b/bitcoin.cpp @@ -7,7 +7,7 @@ #include "uint256.h" #define BITCOIN_SEED_NONCE 0x0539a019ca550825 -#define REQUIRE_HEIGHT 230000 +#define REQUIRE_HEIGHT 140700 #define MIN_VERSION 40000 using namespace std; @@ -109,11 +109,7 @@ class CNode { vRecv >> strSubVer; if (nVersion >= 209 && !vRecv.empty()) vRecv >> nStartingHeight; - if (nStartingHeight && nStartingHeight < REQUIRE_HEIGHT) { - // give them a day to catch up - ban = 86400; - return true; - } + if (nVersion >= 209) { BeginMessage("verack"); EndMessage(); From d8e20ba4844201c0f2dd83c91d0fd614bc5c6cc8 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Mon, 15 Apr 2013 02:47:01 +0000 Subject: [PATCH 2/3] Check for required block height in IsGood to ensure nodes not meeting the requirement are indexed properly --- bitcoin.cpp | 2 -- db.h | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/bitcoin.cpp b/bitcoin.cpp index beeecea..6494c1f 100644 --- a/bitcoin.cpp +++ b/bitcoin.cpp @@ -7,8 +7,6 @@ #include "uint256.h" #define BITCOIN_SEED_NONCE 0x0539a019ca550825 -#define REQUIRE_HEIGHT 140700 -#define MIN_VERSION 40000 using namespace std; diff --git a/db.h b/db.h index 003e7ec..1a6ef1b 100644 --- a/db.h +++ b/db.h @@ -12,6 +12,9 @@ #define MIN_RETRY 1000 +#define REQUIRE_HEIGHT 140700 +#define REQUIRE_VERSION 40000 + std::string static inline ToString(const CService &ip) { std::string str = ip.ToString(); while (str.size() < 22) str += ' '; @@ -90,7 +93,8 @@ public: if (ip.GetPort() != 8333) return false; if (!(services & NODE_NETWORK)) return false; if (!ip.IsRoutable()) return false; - if (clientVersion && clientVersion < 32400) return false; + if (clientVersion && clientVersion < REQUIRE_VERSION) return false; + if (blocks && blocks < REQUIRE_HEIGHT) return false; if (total <= 3 && success * 2 >= total) return true; From d7f5c245a3b3e7978cbe596f7e6279da83949580 Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Mon, 15 Apr 2013 02:52:57 +0000 Subject: [PATCH 3/3] Update required height to 230k --- db.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db.h b/db.h index 1a6ef1b..1946492 100644 --- a/db.h +++ b/db.h @@ -12,7 +12,7 @@ #define MIN_RETRY 1000 -#define REQUIRE_HEIGHT 140700 +#define REQUIRE_HEIGHT 230000 #define REQUIRE_VERSION 40000 std::string static inline ToString(const CService &ip) {