// Settings
int64 nTransactionFee = MIN_TX_FEE;
bool fStakeUsePooledKeys = false;
+extern enum Checkpoints::CPMode CheckpointsMode;
//////////////////////////////////////////////////////////////////////////////
//
if (!Checkpoints::CheckHardened(nHeight, hash))
return DoS(100, error("AcceptBlock() : rejected by hardened checkpoint lock-in at %d", nHeight));
+ bool cpSatisfies = Checkpoints::CheckSync(hash, pindexPrev);
+
// Check that the block satisfies synchronized checkpoint
- if (!GetBoolArg("-nosynccheckpoints", false) && !Checkpoints::CheckSync(hash, pindexPrev))
+ if (CheckpointsMode == Checkpoints::STRICT && !cpSatisfies)
return error("AcceptBlock() : rejected by synchronized checkpoint");
+ if (CheckpointsMode == Checkpoints::ADVISORY && !cpSatisfies)
+ strMiscWarning = _("WARNING: syncronized checkpoint violation detected, but skipped!");
+
// Enforce rule that the coinbase starts with serialized block height
CScript expect = CScript() << nHeight;
if (vtx[0].vin[0].scriptSig.size() < expect.size() ||
// * Should not enter safe mode for longer invalid chain
// * If sync-checkpoint is too old do not enter safe mode
- // * Do not display warning if -nosynccheckpoints specified
- if (!GetBoolArg("-nosynccheckpoints", false) && Checkpoints::IsSyncCheckpointTooOld(60 * 60 * 24 * 10) && !fTestNet && !IsInitialBlockDownload())
+ // * Display warning only in the STRICT mode
+ if (CheckpointsMode == Checkpoints::STRICT && Checkpoints::IsSyncCheckpointTooOld(60 * 60 * 24 * 10) &&
+ !fTestNet && !IsInitialBlockDownload())
{
nPriority = 100;
- strStatusBar = "WARNING: Checkpoint is too old. Wait for block chain to download, or notify developers.";
+ strStatusBar = _("WARNING: Checkpoint is too old. Wait for block chain to download, or notify developers.");
}
// ppcoin: if detected invalid checkpoint enter safe mode
if (Checkpoints::hashInvalidCheckpoint != 0)
{
nPriority = 3000;
- strStatusBar = strRPC = "WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers.";
+ strStatusBar = strRPC = _("WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers.");
}
// Alerts