Make IsSuperMajority a standalone function

This commit is contained in:
Pieter Wuille
2014-11-24 14:51:10 +01:00
parent 3bb29a3e13
commit 9dcd524f32
2 changed files with 10 additions and 13 deletions

View File

@@ -236,14 +236,6 @@ public:
return pbegin[(pend - pbegin)/2];
}
/**
* Returns true if there are nRequired or more blocks of minVersion or above
* in the last Params().ToCheckBlockUpgradeMajority() blocks, starting at pstart
* and going backwards.
*/
static bool IsSuperMajority(int minVersion, const CBlockIndex* pstart,
unsigned int nRequired);
std::string ToString() const
{
return strprintf("CBlockIndex(pprev=%p, nHeight=%d, merkle=%s, hashBlock=%s)",