Merge pull request #591 from patricklodder/1.8-version-check-fix

Check against the right aux block version number
This commit is contained in:
langerhans 2014-08-04 19:17:20 +02:00
commit 7b70a67db0

View file

@ -2055,9 +2055,10 @@ void static UpdateTip(CBlockIndex *pindexNew) {
{
int nUpgraded = 0;
const CBlockIndex* pindex = chainActive.Tip();
int nAuxVersion = CBlockHeader::CURRENT_VERSION | (AUXPOW_CHAIN_ID * BLOCK_VERSION_CHAIN_START);
for (int i = 0; i < 100 && pindex != NULL; i++)
{
if (pindex->nVersion > CBlock::CURRENT_VERSION && pindex->nVersion != BLOCK_VERSION_AUXPOW)
if (pindex->nVersion > CBlock::CURRENT_VERSION && pindex->nVersion != nAuxVersion)
++nUpgraded;
pindex = pindex->pprev;
}