Skip to content

Commit c858302

Browse files
committed
Change format of log2_work for uniform output (zero-padded)
1 parent 35ed88f commit c858302

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/validation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,12 +1430,12 @@ void static InvalidChainFound(CBlockIndex* pindexNew) EXCLUSIVE_LOCKS_REQUIRED(c
14301430
pindexBestHeader = ::ChainActive().Tip();
14311431
}
14321432

1433-
LogPrintf("%s: invalid block=%s height=%d log2_work=%.8g date=%s\n", __func__,
1433+
LogPrintf("%s: invalid block=%s height=%d log2_work=%f date=%s\n", __func__,
14341434
pindexNew->GetBlockHash().ToString(), pindexNew->nHeight,
14351435
log(pindexNew->nChainWork.getdouble())/log(2.0), FormatISO8601DateTime(pindexNew->GetBlockTime()));
14361436
CBlockIndex *tip = ::ChainActive().Tip();
14371437
assert (tip);
1438-
LogPrintf("%s: current best=%s height=%d log2_work=%.8g date=%s\n", __func__,
1438+
LogPrintf("%s: current best=%s height=%d log2_work=%f date=%s\n", __func__,
14391439
tip->GetBlockHash().ToString(), ::ChainActive().Height(), log(tip->nChainWork.getdouble())/log(2.0),
14401440
FormatISO8601DateTime(tip->GetBlockTime()));
14411441
CheckForkWarningConditions();
@@ -2485,7 +2485,7 @@ void static UpdateTip(const CBlockIndex* pindexNew, const CChainParams& chainPar
24852485
if (nUpgraded > 0)
24862486
AppendWarning(warning_messages, strprintf(_("%d of last 100 blocks have unexpected version"), nUpgraded));
24872487
}
2488-
LogPrintf("%s: new best=%s height=%d version=0x%08x log2_work=%.8g tx=%lu date='%s' progress=%f cache=%.1fMiB(%utxo)%s\n", __func__,
2488+
LogPrintf("%s: new best=%s height=%d version=0x%08x log2_work=%f tx=%lu date='%s' progress=%f cache=%.1fMiB(%utxo)%s\n", __func__,
24892489
pindexNew->GetBlockHash().ToString(), pindexNew->nHeight, pindexNew->nVersion,
24902490
log(pindexNew->nChainWork.getdouble())/log(2.0), (unsigned long)pindexNew->nChainTx,
24912491
FormatISO8601DateTime(pindexNew->GetBlockTime()),

0 commit comments

Comments
 (0)