Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 2,153 Lines • ▼ Show 20 Lines | if (!IsInitialBlockDownload()) { | ||||
++nUpgraded; | ++nUpgraded; | ||||
} | } | ||||
pindex = pindex->pprev; | pindex = pindex->pprev; | ||||
} | } | ||||
if (nUpgraded > 0) { | if (nUpgraded > 0) { | ||||
warningMessages.push_back(strprintf( | warningMessages.push_back(strprintf( | ||||
_("%d of last 100 blocks have unexpected version"), nUpgraded)); | _("%d of last 100 blocks have unexpected version"), nUpgraded)); | ||||
} | } | ||||
if (nUpgraded > 100 / 2) { | |||||
std::string strWarning = | |||||
_("Warning: Unknown block versions being mined! It's possible " | |||||
"unknown rules are in effect"); | |||||
// notify GetWarnings(), called by Qt and the JSON-RPC code to warn | |||||
// the user: | |||||
DoWarning(strWarning); | |||||
} | |||||
} | } | ||||
LogPrintf("%s: new best=%s height=%d version=0x%08x log2_work=%.8g tx=%lu " | LogPrintf("%s: new best=%s height=%d version=0x%08x log2_work=%.8g tx=%lu " | ||||
"date='%s' progress=%f cache=%.1fMiB(%utxo)", | "date='%s' progress=%f cache=%.1fMiB(%utxo)", | ||||
__func__, chainActive.Tip()->GetBlockHash().ToString(), | __func__, chainActive.Tip()->GetBlockHash().ToString(), | ||||
chainActive.Height(), chainActive.Tip()->nVersion, | chainActive.Height(), chainActive.Tip()->nVersion, | ||||
log(chainActive.Tip()->nChainWork.getdouble()) / log(2.0), | log(chainActive.Tip()->nChainWork.getdouble()) / log(2.0), | ||||
(unsigned long)chainActive.Tip()->nChainTx, | (unsigned long)chainActive.Tip()->nChainTx, | ||||
FormatISO8601DateTime(chainActive.Tip()->GetBlockTime()), | FormatISO8601DateTime(chainActive.Tip()->GetBlockTime()), | ||||
▲ Show 20 Lines • Show All 3,468 Lines • Show Last 20 Lines |