return DoS(100, error("AcceptBlock() : incorrect %s", IsProofOfWork() ? "proof-of-work" : "proof-of-stake"));
int64_t nMedianTimePast = pindexPrev->GetMedianTimePast();
- int nMaxOffset = 12 * 3600; // 12 hours
+ int nMaxOffset = 12 * nOneHour; // 12 hours
if (pindexPrev->nTime < 1450569600)
- nMaxOffset = 7 * 86400; // One week until 20 Dec, 2015
+ nMaxOffset = nOneWeek; // One week until 20 Dec, 2015
// Check timestamp against prev
if (GetBlockTime() <= nMedianTimePast || FutureDrift(GetBlockTime()) < pindexPrev->GetBlockTime())
// it'll get a pile of addresses with newer timestamps.
// Seed nodes are given a random 'last seen time' of between one and two
// weeks ago.
- const int64_t nOneWeek = 7*24*60*60;
struct in_addr ip;
memcpy(&ip, &pnSeed[i], sizeof(ip));
CAddress addr(CService(ip, GetDefaultPort()));
std::vector<CAddress> vAdd;
for (unsigned int i = 0; i < ARRAYLEN(pchTorSeed); i++)
{
- const int64_t nOneWeek = 7*24*60*60;
CAddress addr(CService(pchTorSeed[i], GetDefaultPort()));
addr.nTime = GetTime()-GetRand(nOneWeek)-nOneWeek;
vAdd.push_back(addr);
static const int32_t nOneHour = 60 * 60;
static const int32_t nOneDay = 24 * 60 * 60;
+static const int64_t nOneWeek = 7 * 24 * 60 * 60;
static const int64_t COIN = 1000000;
static const int64_t CENT = 10000;