Feathercoin specific changes made to - FTC 0.11.2.
Smart Contract Status Review
Active blockheader version 4.0 : : commit
https://github.com/wrapperband/Feathercoin/commit/bcc6a7f88763f5fd04107cb1eb9ea56ab8fbff70
src/chain.h
- int cVersion;
Code removed
- cVersion = 0;
Code removed
- cVersion = block.cVersion;
Code removed
- block.cVersion = cVersion;
- READWRITE(this->cVersion);
- block.cVersion = cVersion;
Code removed
src/main.cpp
- static bool IsSuperMajority(int minVersion, int min_cVersion, const CBlockIndex* pstart, unsigned nRequired, const Consensus::Params& consensusParams);
+ static bool IsSuperMajority(int minVersion, const CBlockIndex* pstart, unsigned nRequired, const Consensus::Params& consensusParams);
Code replaced
- int cUpgraded = 0;
Code removed
- if (pindex->cVersion > CBlock::ACTIVE_VERSION)
- ++cUpgraded;
Code removed
- if (cUpgraded > 0)
- LogPrintf("%s: %d of last 500 blocks above nVersion %d\n", __func__, nUpgraded, (int)CBlock::CURRENT_VERSION);
Code removed
- if ((nUpgraded > 500/2)||(cUpgraded > 500/2))
+ if (nUpgraded > 500/2)
Code replaced
- if (block.nVersion < 2 && IsSuperMajority(2,5, pindexPrev, consensusParams.nMajorityRejectBlockOutdated, consensusParams))
+ if (block.nVersion < 2 && IsSuperMajority(2, pindexPrev, consensusParams.nMajorityRejectBlockOutdated, consensusParams))
Code replaced
- if (block.nVersion < 3 && IsSuperMajority(3,5, pindexPrev, consensusParams.nMajorityRejectBlockOutdated, consensusParams))
+ if (block.nVersion < 3 && IsSuperMajority(3, pindexPrev, consensusParams.nMajorityRejectBlockOutdated, consensusParams))
Code replaced
- if (block.nVersion < 4 && IsSuperMajority(4,5, pindexPrev, consensusParams.nMajorityRejectBlockOutdated, consensusParams))
+ if (block.nVersion < 4 && IsSuperMajority(4, pindexPrev, consensusParams.nMajorityRejectBlockOutdated, consensusParams))
Code replaced
- if (block.cVersion < 5 && IsSuperMajority(4,5, pindexPrev, consensusParams.nMajorityRejectBlockOutdated, consensusParams))
+ if (block.cVersion < 5 && IsSuperMajority(4, pindexPrev, consensusParams.nMajorityRejectBlockOutdated, consensusParams))
Code replaced
- && IsSuperMajority(2, 5,pindexPrev, consensusParams.nMajorityEnforceBlockUpgrade, consensusParams))
+ && IsSuperMajority(2, pindexPrev, consensusParams.nMajorityEnforceBlockUpgrade, consensusParams))
Code replaced
- && IsSuperMajority(4, 5, pindexPrev, consensusParams.nMajorityEnforceBlockUpgrade, consensusParams))
+ && IsSuperMajority(4, pindexPrev, consensusParams.nMajorityEnforceBlockUpgrade, consensusParams))
Code replaced
-static bool IsSuperMajority(int minVersion,int min_cVersion, const CBlockIndex* pstart, unsigned nRequired, const Consensus::Params& consensusParams)
+static bool IsSuperMajority(int minVersion, const CBlockIndex* pstart, unsigned nRequired, const Consensus::Params& consensusParams)
Code replaced
- unsigned int cFound = 0;
Code removed
- LogPrintf("IsSuperMajority: minVersion=%d,min_cVersion=%d, nRequired=%d, nFound=%d, cFound=%d\n",minVersion, min_cVersion, nRequired, nFound, cFound);
- return ((nFound >= nRequired)||(cFound >= nRequired));
+ LogPrintf("IsSuperMajority: minVersion=%d, nRequired=%d, nFound=%d\n",minVersion, nRequired, nFound);
+ return (nFound >= nRequired);
Code replaced
src/primitives/block.h
- static const int32_t ACTIVE_VERSION=4;
- static const int32_t CURRENT_VERSION=2; //be locked
+ static const int32_t CURRENT_VERSION=4; //active new version
Code replaced
- cVersion = CBlockHeader::ACTIVE_VERSION;
Code removed