diff options
| author | Patrick Lodder <[email protected]> | 2021-02-13 17:21:20 +0100 |
|---|---|---|
| committer | Patrick Lodder <[email protected]> | 2021-02-13 17:24:55 +0100 |
| commit | 0c600d7f9d832836a9389bf77918472beeb23907 (patch) | |
| tree | e9fbb3dd6b74b34a58e0854fdf3c329cd2e13e0a /src/rpc/blockchain.cpp | |
| parent | Merge pull request #1705 from rnicoll/block-download-timeout (diff) | |
| download | discoin-0c600d7f9d832836a9389bf77918472beeb23907.tar.xz discoin-0c600d7f9d832836a9389bf77918472beeb23907.zip | |
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
Diffstat (limited to 'src/rpc/blockchain.cpp')
| -rw-r--r-- | src/rpc/blockchain.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
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)); |