Skip to content

Commit

Permalink
[Trivial] Fix styling/logging nits
Browse files Browse the repository at this point in the history
  • Loading branch information
random-zebra committed Apr 18, 2021
1 parent 637812d commit 1720ff3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/evo/deterministicmns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ CDeterministicMNCPtr CDeterministicMNList::GetMNByInternalId(uint64_t internalId
return GetMN(*proTxHash);
}

static int CompareByLastPaid_GetHeight(const CDeterministicMN& dmn)
static int CompareByLastPaidGetHeight(const CDeterministicMN& dmn)
{
int height = dmn.pdmnState->nLastPaidHeight;
if (dmn.pdmnState->nPoSeRevivedHeight != -1 && dmn.pdmnState->nPoSeRevivedHeight > height) {
Expand All @@ -201,8 +201,8 @@ static int CompareByLastPaid_GetHeight(const CDeterministicMN& dmn)

static bool CompareByLastPaid(const CDeterministicMN& _a, const CDeterministicMN& _b)
{
int ah = CompareByLastPaid_GetHeight(_a);
int bh = CompareByLastPaid_GetHeight(_b);
int ah = CompareByLastPaidGetHeight(_a);
int bh = CompareByLastPaidGetHeight(_b);
if (ah == bh) {
return _a.proTxHash < _b.proTxHash;
} else {
Expand Down
8 changes: 4 additions & 4 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1907,9 +1907,9 @@ bool AppInitMain()
if (fDeterministic) {
// Check enforcement
if (!deterministicMNManager->IsDIP3Enforced()) {
const std::string strError = "Cannot start deterministic masternode before enforcement. Remove -mnoperatorprivatekey to start as legacy masternode";
const std::string strError = strprintf(_("Cannot start deterministic masternode before enforcement. Remove %s to start as legacy masternode"), "-mnoperatorprivatekey");
LogPrintf("-- ERROR: %s\n", strError);
return UIError(_(strError.c_str()));
return UIError(strError);
}
// Create and register activeMasternodeManager
activeMasternodeManager = new CActiveDeterministicMasternodeManager();
Expand All @@ -1921,9 +1921,9 @@ bool AppInitMain()
} else {
// Check enforcement
if (deterministicMNManager->LegacyMNObsolete()) {
const std::string strError = "Legacy masternode system disabled. Use -mnoperatorprivatekey to start as deterministic masternode";
const std::string strError = strprintf(_("Legacy masternode system disabled. Use %s to start as deterministic masternode"), "-mnoperatorprivatekey");
LogPrintf("-- ERROR: %s\n", strError);
return UIError(_(strError.c_str()));
return UIError(strError);
}
auto res = initMasternode(gArgs.GetArg("-masternodeprivkey", ""), gArgs.GetArg("-masternodeaddr", ""), true);
if (!res) { return UIError(res.getError()); }
Expand Down
6 changes: 3 additions & 3 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1937,12 +1937,12 @@ void static UpdateTip(CBlockIndex* pindexNew)
}

const CBlockIndex* pChainTip = chainActive.Tip();
LogPrintf("%s: new best=%s height=%d version=%d log2_work=%.16f tx=%lu date=%s progress=%f cache=%.1fMiB(%utxo)\n",
LogPrintf("%s: new best=%s height=%d version=%d log2_work=%.16f tx=%lu date=%s progress=%f cache=%.1fMiB(%utxo) evodb_cache=%.1fMiB\n",
__func__,
pChainTip->GetBlockHash().GetHex(), pChainTip->nHeight, pChainTip->nVersion, log(pChainTip->nChainWork.getdouble()) / log(2.0), (unsigned long)pChainTip->nChainTx,
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", pChainTip->GetBlockTime()),
Checkpoints::GuessVerificationProgress(pChainTip), pcoinsTip->DynamicMemoryUsage() * (1.0 / (1<<20)), pcoinsTip->GetCacheSize());
LogPrintf("%s: evodb_cache=%.1fMiB\n", __func__, evoDb->GetMemoryUsage() * (1.0 / (1<<20)));
Checkpoints::GuessVerificationProgress(pChainTip), pcoinsTip->DynamicMemoryUsage() * (1.0 / (1<<20)), pcoinsTip->GetCacheSize(),
evoDb->GetMemoryUsage() * (1.0 / (1<<20)));

// Check the version of the last 100 blocks to see if we need to upgrade:
static bool fWarned = false;
Expand Down

0 comments on commit 1720ff3

Please sign in to comment.