some nodes are still on the wrong chain (block 18973 with an invalid spamuser). checkpoint the

correct branch to force them to go to the right chain.
This commit is contained in:
Miguel Freitas 2014-01-13 08:03:43 -02:00
parent e0dad4a114
commit bf3ec900d0
5 changed files with 10 additions and 6 deletions

View File

@ -1084,7 +1084,7 @@ json_spirit::Value CRPCTable::execute(const std::string &strMethod, const json_s
// Observe safe mode
string strWarning = GetWarnings("rpc");
if (strWarning != "" && !GetBoolArg("-disablesafemode", false) &&
if (strWarning != "" && !GetBoolArg("-disablesafemode", true) &&
!pcmd->okSafeMode)
throw JSONRPCError(RPC_FORBIDDEN_BY_SAFE_MODE, string("Safe mode: ") + strWarning);

View File

@ -41,11 +41,12 @@ namespace Checkpoints
( 13081, uint256("0x5125dc1f6a3b8f1c463baf3e078d8af9f1b35aa4b34fb441e3a7ee391f8727c6"))
( 18000, uint256("0xa3cab01c0e3e9b17b2a63b3cc93d258112f5ad753df1df7bd45e37a5c60814a9"))
( 18050, uint256("0xef0d4c9e318a952dd45fcb1c867996df309a0fb586811479c08cf18a176a8864"))
( 18973, uint256("0x5f3f60fec53ac03434907ca980b5349875822794a4a0b50b78bcf0411d0c95fe"))
;
static const CCheckpointData data = {
&mapCheckpoints,
1389337278, // * UNIX timestamp of last checkpoint block
21168, // * total number of transactions between genesis and last checkpoint
1389556451, // * UNIX timestamp of last checkpoint block
22193, // * total number of transactions between genesis and last checkpoint
// (the tx=... number in the SetBestChain debug.log lines)
144.0 // * estimated number of transactions per day after checkpoint
};

View File

@ -8,7 +8,7 @@
// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 0
#define CLIENT_VERSION_MINOR 9
#define CLIENT_VERSION_REVISION 01
#define CLIENT_VERSION_REVISION 02
#define CLIENT_VERSION_BUILD 0
// Set to true for release, false for prerelease or test build

View File

@ -245,7 +245,7 @@ std::string HelpMessage()
strUsage += " -keypool=<n> " + _("Set key pool size to <n> (default: 100)") + "\n";
strUsage += " -rescan " + _("Rescan the block chain for missing wallet transactions") + "\n";
strUsage += " -salvagewallet " + _("Attempt to recover private keys from a corrupt twisterwallet.dat") + "\n";
strUsage += " -checkblocks=<n> " + _("How many blocks to check at startup (default: 120, 0 = all)") + "\n";
strUsage += " -checkblocks=<n> " + _("How many blocks to check at startup (default: 500, 0 = all)") + "\n";
strUsage += " -checklevel=<n> " + _("How thorough the block verification is (0-4, default: 3)") + "\n";
strUsage += " -txindex " + _("Maintain a full transaction index (default: 0)") + "\n";
strUsage += " -loadblock=<file> " + _("Imports blocks from external blk000??.dat file") + "\n";
@ -755,7 +755,7 @@ bool AppInit2(boost::thread_group& threadGroup)
uiInterface.InitMessage(_("Verifying blocks..."));
if (!VerifyDB(GetArg("-checklevel", 3),
GetArg( "-checkblocks", 120))) {
GetArg( "-checkblocks", 500))) {
strLoadError = _("Corrupted block database detected");
break;
}

View File

@ -58,10 +58,12 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex)
Array txuserhashes;
Array usernames;
std::string spamMessage;
std::string spamUser;
BOOST_FOREACH(const CTransaction&tx, block.vtx) {
txs.push_back(tx.GetHash().GetHex());
if( tx.IsSpamMessage() ) {
spamMessage = tx.message.ExtractPushDataString(0);
spamUser = tx.userName.ExtractPushDataString(0);
} else {
txuserhashes.push_back(tx.GetUsernameHash().GetHex());
usernames.push_back(tx.userName.ExtractSmallString());
@ -69,6 +71,7 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex)
}
result.push_back(Pair("tx", txs));
result.push_back(Pair("spamMessage", spamMessage));
result.push_back(Pair("spamUser", spamUser));
result.push_back(Pair("userhashes", txuserhashes));
result.push_back(Pair("usernames", usernames));
result.push_back(Pair("time", (boost::int64_t)block.GetBlockTime()));