From 0c600d7f9d832836a9389bf77918472beeb23907 Mon Sep 17 00:00:00 2001 From: Patrick Lodder Date: Sat, 13 Feb 2021 17:21:20 +0100 Subject: Fixate BIP65 softfork heights - Re-introduce Params.BIP65Height - Fixate block 1854705 for testnet - Fixate block 3464751 for mainnet - Fixate block 1351 for regtest - Stop using IsSuperMajority() in validation for BIP65 - Simplify RPC SoftForkMajorityDesc --- src/rpc/blockchain.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/rpc/blockchain.cpp') diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index c80dd85fa..4e8eff7e0 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1071,20 +1071,7 @@ static UniValue SoftForkMajorityDesc(int version, CBlockIndex* pindex, const Con activated = pindex->nHeight >= consensusParams.BIP66Height; break; case 4: - int nFound = 0; - int nRequired = consensusParams.nMajorityRejectBlockOutdated; - CBlockIndex* pstart = pindex; - for (int i = 0; i < consensusParams.nMajorityWindow && pstart != NULL; i++) - { - if (pstart->GetBaseVersion() >= version) - ++nFound; - pstart = pstart->pprev; - } - - activated = nFound >= nRequired; - rv.push_back(Pair("found", nFound)); - rv.push_back(Pair("required", nRequired)); - rv.push_back(Pair("window", consensusParams.nMajorityWindow)); + activated = pindex->nHeight >= consensusParams.BIP65Height; break; } rv.push_back(Pair("status", activated)); -- cgit v1.2.3