Skip to content

Commit

Permalink
Allow Checkpoint Override on 2.2.0.2
Browse files Browse the repository at this point in the history
Non-critical/Non-mandatory update.

Update to this if you get stuck and unable to sync after the 2.2.0.2 update goes into effect.

There is an unlikely but possible scenario where you could end up with a valid block that meets all of the 2.2.0.2 criteria but the network has elected to follow an alternative chain to the one that you have. This update will allow you to sync to the most recent network checkpoint.

This should not be necessary under most circumstances, but exists as a precaution in case forks do occur.
  • Loading branch information
JRedinger committed Sep 18, 2018
1 parent 2005388 commit 34a9bbd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pinkcoin-qt.pro
@@ -1,6 +1,6 @@
TEMPLATE = app
TARGET = Pinkcoin-Qt
VERSION = 2.2.0.2
VERSION = 2.2.0.3
INCLUDEPATH += src src/json src/qt src/qt/plugins/mrichtexteditor
DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
CONFIG += no_include_pwd
Expand Down
6 changes: 3 additions & 3 deletions share/qt/Info.plist
Expand Up @@ -7,11 +7,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleGetInfoString</key>
<string>2.2.0.2 CryptoROX, Copyright © 2016-2018 The Pinkcoin developers</string>
<string>2.2.0.3 CryptoROX, Copyright © 2016-2018 The Pinkcoin developers</string>
<key>CFBundleShortVersionString</key>
<string>2.2.0.2</string>
<string>2.2.0.3</string>
<key>CFBundleVersion</key>
<string>2.2.0.2</string>
<string>2.2.0.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleExecutable</key>
Expand Down
2 changes: 1 addition & 1 deletion src/clientversion.h
Expand Up @@ -9,7 +9,7 @@
#define CLIENT_VERSION_MAJOR 2
#define CLIENT_VERSION_MINOR 2
#define CLIENT_VERSION_REVISION 0
#define CLIENT_VERSION_BUILD 2
#define CLIENT_VERSION_BUILD 3

// Converts the parameter X to a string after macro replacement on X has been performed.
// Don't merge these into one macro!
Expand Down
3 changes: 1 addition & 2 deletions src/main.cpp
Expand Up @@ -2443,7 +2443,7 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock)
// trying to replace have less than desirable spacing or our best blocks are less than 2 minutes seconds old.
int64_t nNow = GetAdjustedTime();
int heightDiff = pindexBest->nHeight - nHeight;
if(pindexBest->nTime > 1537340400 && heightDiff > -1) { // Tuesday, September 19, 2018 7:00:00 AM UTC, can get rid of the time after the fork as it only applies to live blockchain updates.
if(pindexBest->nTime > 1537340400 && heightDiff > -1 && !Checkpoints::WantedByPendingSyncCheckpoint(hash)) { // Tuesday, September 19, 2018 7:00:00 AM UTC, can get rid of the time after the fork as it only applies to live blockchain updates.
printf("We're checking this one out. \n");
CBlockIndex *pindexBestCheck;
for (pindexBestCheck = pindexBest ; pindexBestCheck->nHeight + 1 > nHeight; pindexBestCheck = pindexBestCheck->pprev)
Expand All @@ -2466,7 +2466,6 @@ bool ProcessBlock(CNode* pfrom, CBlock* pblock)
}
}


// Store to disk
if (!pblock->AcceptBlock())
return error("ProcessBlock() : AcceptBlock FAILED");
Expand Down

0 comments on commit 34a9bbd

Please sign in to comment.