mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Slightly improve/cleanup log output (#1174)
This commit is contained in:
parent
17cebbed15
commit
15cf414967
@ -174,7 +174,7 @@ void CActiveMasternode::ManageStateInitial()
|
||||
}
|
||||
|
||||
if(pwalletMain->GetBalance() < 1000*COIN) {
|
||||
LogPrintf("CActiveMasternode::ManageStateInitial -- %s: Wallet balance is < 1000 DASH", GetStateString());
|
||||
LogPrintf("CActiveMasternode::ManageStateInitial -- %s: Wallet balance is < 1000 DASH\n", GetStateString());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -296,7 +296,7 @@ bool CGovernanceManager::AddGovernanceObject(CGovernanceObject& govobj)
|
||||
// IF WE HAVE THIS OBJECT ALREADY, WE DON'T WANT ANOTHER COPY
|
||||
|
||||
if(mapObjects.count(nHash)) {
|
||||
LogPrintf("CGovernanceManager::AddGovernanceObject -- already have governance object - %s\n", strError);
|
||||
LogPrintf("CGovernanceManager::AddGovernanceObject -- already have governance object %s\n", nHash.ToString());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -873,8 +873,12 @@ void CGovernanceManager::AddCachedTriggers()
|
||||
void CGovernanceManager::InitOnLoad()
|
||||
{
|
||||
LOCK(cs);
|
||||
int64_t nStart = GetTimeMillis();
|
||||
LogPrintf("Preparing masternode indexes and governance triggers...\n");
|
||||
RebuildIndexes();
|
||||
AddCachedTriggers();
|
||||
LogPrintf("Masternode indexes and governance triggers prepared %dms\n", GetTimeMillis() - nStart);
|
||||
LogPrintf(" %s\n", ToString());
|
||||
}
|
||||
|
||||
std::string CGovernanceManager::ToString() const
|
||||
@ -882,8 +886,8 @@ std::string CGovernanceManager::ToString() const
|
||||
std::ostringstream info;
|
||||
|
||||
info << "Governance Objects: " << (int)mapObjects.size() <<
|
||||
", Seen Budgets : " << (int)mapSeenGovernanceObjects.size() <<
|
||||
", Vote Count : " << (int)mapVoteToObject.GetSize();
|
||||
" (Seen: " << (int)mapSeenGovernanceObjects.size() <<
|
||||
"), Vote Count: " << (int)mapVoteToObject.GetSize();
|
||||
|
||||
return info.str();
|
||||
}
|
||||
|
@ -168,16 +168,16 @@ void CMasternode::Check(bool fForce)
|
||||
|
||||
static int64_t nTimeStart = GetTime();
|
||||
|
||||
LogPrint("masternode", "CMasternode::Check start -- vin %s\n", vin.prevout.ToStringShort());
|
||||
|
||||
//once spent, stop doing the checks
|
||||
if(nActiveState == MASTERNODE_OUTPOINT_SPENT) return;
|
||||
|
||||
if(ShutdownRequested()) return;
|
||||
|
||||
if(!fForce && (GetTime() - nTimeLastChecked < MASTERNODE_CHECK_SECONDS)) return;
|
||||
nTimeLastChecked = GetTime();
|
||||
|
||||
LogPrint("masternode", "CMasternode::Check -- Masternode %s is in %s state\n", vin.prevout.ToStringShort(), GetStateString());
|
||||
|
||||
//once spent, stop doing the checks
|
||||
if(nActiveState == MASTERNODE_OUTPOINT_SPENT) return;
|
||||
|
||||
int nHeight = 0;
|
||||
if(!fUnitTest) {
|
||||
TRY_LOCK(cs_main, lockMain);
|
||||
|
@ -1136,7 +1136,7 @@ void CMasternodeMan::ProcessVerifyReply(CNode* pnode, CMasternodeVerification& m
|
||||
LogPrint("masternode", "CMasternodeMan::ProcessVerifyBroadcast -- increased PoSe ban score for %s addr %s, new score %d\n",
|
||||
prealMasternode->vin.prevout.ToStringShort(), pnode->addr.ToString(), pmn->nPoSeBanScore);
|
||||
}
|
||||
LogPrintf("CMasternodeMan::ProcessVerifyBroadcast -- PoSe score incresed for %d fake masternodes, addr %s\n",
|
||||
LogPrintf("CMasternodeMan::ProcessVerifyBroadcast -- PoSe score increased for %d fake masternodes, addr %s\n",
|
||||
(int)vpMasternodesToBan.size(), pnode->addr.ToString());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user