Litecoin: Lockin v2 blocks at 710k mainnet, 400k testnet

pull/174/head
Warren Togami 10 years ago
parent e77aede122
commit 52b3c6d66b

@ -1,6 +1,6 @@
0.8.7.3 changes
0.8.7.4 changes
=============
- Enforce v2 blocks at height 700000
- Enforce v2 blocks at height 710000 on mainnet, 400000 on testnet
- Add `-maxorphantx=<n>` and `-maxorphanblocks=<n>` options for control over the maximum orphan transactions and blocks
- Stricter memory limits on CNode
- Upgrade OpenSSL to 1.0.1i (see https://www.openssl.org/news/secadv_20140806.txt - just to be sure, no critical issues

@ -2208,10 +2208,11 @@ bool CBlock::AcceptBlock(CValidationState &state, CDiskBlockPos *dbp)
if (pcheckpoint && nHeight < pcheckpoint->nHeight)
return state.DoS(100, error("AcceptBlock() : forked chain older than last checkpoint (height %d)", nHeight));
// Reject block.nVersion=1 blocks when 95% (75% on testnet) of the network has upgraded:
// Reject block.nVersion=1 blocks (mainnet >= 710000, testnet >= 400000)
if (nVersion < 2)
{
if (!fTestNet && nHeight >= 700000)
if ((!fTestNet && nHeight >= 710000) ||
(fTestNet && nHeight >= 400000))
{
return state.Invalid(error("AcceptBlock() : rejected nVersion=1 block"));
}
@ -2219,9 +2220,8 @@ bool CBlock::AcceptBlock(CValidationState &state, CDiskBlockPos *dbp)
// Enforce block.nVersion=2 rule that the coinbase starts with serialized block height
if (nVersion >= 2)
{
// if 750 of the last 1,000 blocks are version 2 or greater (51/100 if testnet):
if ((!fTestNet && CBlockIndex::IsSuperMajority(2, pindexPrev, 750, 1000)) ||
(fTestNet && CBlockIndex::IsSuperMajority(2, pindexPrev, 51, 100)))
if ((!fTestNet && nHeight >= 710000) ||
(fTestNet && nHeight >= 400000))
{
CScript expect = CScript() << nHeight;
if (vtx[0].vin[0].scriptSig.size() < expect.size() ||

Loading…
Cancel
Save