aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-08-15 22:21:03 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2010-08-15 22:21:03 +0000
commit85de7d7c0cbb1e9aa311606644b697674c84f6f9 (patch)
treefe0e9a0ac940d01d6c693e0e66709cca28e4c7a8
parentd4c6b90ca3f9b47adb1b2724a0c3514f80635c84 (diff)
scanback check to prevent adding to the 74638 overflow chain
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@133 1a98c847-1fd6-4fd8-948a-caf3550aa51b
-rw-r--r--main.cpp11
-rw-r--r--serialize.h2
2 files changed, 11 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index 0977b32400..6fe0c0e9ed 100644
--- a/main.cpp
+++ b/main.cpp
@@ -1393,7 +1393,16 @@ bool CBlock::AcceptBlock()
(pindexPrev->nHeight+1 == 68555 && hash != uint256("0x00000000001e1b4903550a0b96e9a9405c8a95f387162e4944e8d9fbe501cd6a")) ||
(pindexPrev->nHeight+1 == 70567 && hash != uint256("0x00000000006a49b14bcf27462068f1264c961f11fa2e0eddd2be0791e1d4124a")) ||
(pindexPrev->nHeight+1 == 74000 && hash != uint256("0x0000000000573993a3c9e41ce34471c079dcf5f52a0e824a81e7f953b8661a20")))
- return error("AcceptBlock() : rejected by checkpoint lockin");
+ return error("AcceptBlock() : rejected by checkpoint lockin at %d", pindexPrev->nHeight+1);
+
+ // Scanback checkpoint lockin
+ for (CBlockIndex* pindex = pindexPrev; pindex->nHeight >= 74000; pindex = pindex->pprev)
+ {
+ if (pindex->nHeight == 74000 && pindex->GetBlockHash() != uint256("0x0000000000573993a3c9e41ce34471c079dcf5f52a0e824a81e7f953b8661a20"))
+ return error("AcceptBlock() : rejected by scanback lockin at %d", pindex->nHeight);
+ if (pindex->nHeight == 74638 && pindex->GetBlockHash() == uint256("0x0000000000790ab3f22ec756ad43b6ab569abf0bddeb97c67a6f7b1470a7ec1c"))
+ return error("AcceptBlock() : rejected by scanback lockin at %d", pindex->nHeight);
+ }
// Write block to history file
if (!CheckDiskSpace(::GetSerializeSize(*this, SER_DISK)))
diff --git a/serialize.h b/serialize.h
index b781b19055..208a96d2f3 100644
--- a/serialize.h
+++ b/serialize.h
@@ -20,7 +20,7 @@ class CDataStream;
class CAutoFile;
static const int VERSION = 310;
-static const char* pszSubVer = ".0";
+static const char* pszSubVer = ".1";