From 52b3c6d66b323969bbd5fdc5886eb57b6c960765 Mon Sep 17 00:00:00 2001 From: Warren Togami Date: Mon, 15 Sep 2014 23:48:02 -1000 Subject: [PATCH] Litecoin: Lockin v2 blocks at 710k mainnet, 400k testnet --- doc/release-notes.md | 4 ++-- src/main.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/release-notes.md b/doc/release-notes.md index 205e8375d..a92aaed99 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -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=` and `-maxorphanblocks=` 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 diff --git a/src/main.cpp b/src/main.cpp index 975ebb5ed..395da039f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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() ||