Skip to content

Commit

Permalink
PPCoin: Check time as well for checkpoint-too-old safe mode
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyking committed Aug 14, 2012
1 parent d4c02f5 commit 2387c21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/checkpoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ namespace Checkpoints
// sync-checkpoint should always be accepted block
assert(mapBlockIndex.count(hashSyncCheckpoint));
const CBlockIndex* pindexSync = mapBlockIndex[hashSyncCheckpoint];
return (nBestHeight >= pindexSync->nHeight + COINBASE_MATURITY);
return (nBestHeight >= pindexSync->nHeight + COINBASE_MATURITY ||
pindexSync->GetBlockTime() + STAKE_MIN_AGE < GetAdjustedTime());
}
}

Expand Down

0 comments on commit 2387c21

Please sign in to comment.