fix nMaxTipAge
This commit is contained in:
parent
c676748beb
commit
f50d534440
@ -101,7 +101,7 @@ public:
|
|||||||
pchMessageStart[3] = 0xbd;
|
pchMessageStart[3] = 0xbd;
|
||||||
vAlertPubKey = ParseHex("048240a8748a80a286b270ba126705ced4f2ce5a7847b3610ea3c06513150dade2a8512ed5ea86320824683fc0818f0ac019214973e677acd1244f6d0571fc5103");
|
vAlertPubKey = ParseHex("048240a8748a80a286b270ba126705ced4f2ce5a7847b3610ea3c06513150dade2a8512ed5ea86320824683fc0818f0ac019214973e677acd1244f6d0571fc5103");
|
||||||
nDefaultPort = 9999;
|
nDefaultPort = 9999;
|
||||||
nMaxTipAge = 24 * 60 * 60;
|
nMaxTipAge = 6 * 60 * 60; // ~144 blocks behind -> 2 x fork detection time, was 24 * 60 * 60 in bitcoin
|
||||||
nPruneAfterHeight = 100000;
|
nPruneAfterHeight = 100000;
|
||||||
|
|
||||||
genesis = CreateGenesisBlock(1390095618, 28917698, 0x1e0ffff0, 1, 50 * COIN);
|
genesis = CreateGenesisBlock(1390095618, 28917698, 0x1e0ffff0, 1, 50 * COIN);
|
||||||
@ -206,7 +206,7 @@ public:
|
|||||||
pchMessageStart[3] = 0xff;
|
pchMessageStart[3] = 0xff;
|
||||||
vAlertPubKey = ParseHex("04517d8a699cb43d3938d7b24faaff7cda448ca4ea267723ba614784de661949bf632d6304316b244646dea079735b9a6fc4af804efb4752075b9fe2245e14e412");
|
vAlertPubKey = ParseHex("04517d8a699cb43d3938d7b24faaff7cda448ca4ea267723ba614784de661949bf632d6304316b244646dea079735b9a6fc4af804efb4752075b9fe2245e14e412");
|
||||||
nDefaultPort = 19999;
|
nDefaultPort = 19999;
|
||||||
nMaxTipAge = 0x7fffffff;
|
nMaxTipAge = 0x7fffffff; // allow mining on top of old blocks for testnet
|
||||||
nPruneAfterHeight = 1000;
|
nPruneAfterHeight = 1000;
|
||||||
|
|
||||||
genesis = CreateGenesisBlock(1390666206, 3861367235, 0x1e0ffff0, 1, 50 * COIN);
|
genesis = CreateGenesisBlock(1390666206, 3861367235, 0x1e0ffff0, 1, 50 * COIN);
|
||||||
@ -291,7 +291,7 @@ public:
|
|||||||
pchMessageStart[1] = 0xc1;
|
pchMessageStart[1] = 0xc1;
|
||||||
pchMessageStart[2] = 0xb7;
|
pchMessageStart[2] = 0xb7;
|
||||||
pchMessageStart[3] = 0xdc;
|
pchMessageStart[3] = 0xdc;
|
||||||
nMaxTipAge = 24 * 60 * 60;
|
nMaxTipAge = 6 * 60 * 60; // ~144 blocks behind -> 2 x fork detection time, was 24 * 60 * 60 in bitcoin
|
||||||
nDefaultPort = 19994;
|
nDefaultPort = 19994;
|
||||||
nPruneAfterHeight = 1000;
|
nPruneAfterHeight = 1000;
|
||||||
|
|
||||||
|
@ -1592,7 +1592,7 @@ bool IsInitialBlockDownload()
|
|||||||
if (lockIBDState)
|
if (lockIBDState)
|
||||||
return false;
|
return false;
|
||||||
bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 ||
|
bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 ||
|
||||||
pindexBestHeader->GetBlockTime() < GetTime() - chainParams.MaxTipAge()); // TODO: was 6 * 60 * 60); // ~144 blocks behind -> 2 x fork detection time
|
pindexBestHeader->GetBlockTime() < GetTime() - chainParams.MaxTipAge());
|
||||||
if (!state)
|
if (!state)
|
||||||
lockIBDState = true;
|
lockIBDState = true;
|
||||||
return state;
|
return state;
|
||||||
|
Loading…
Reference in New Issue
Block a user