diff --git a/src/governance-classes.cpp b/src/governance-classes.cpp index a3b7c08ae..570cb9902 100644 --- a/src/governance-classes.cpp +++ b/src/governance-classes.cpp @@ -487,7 +487,7 @@ CSuperblock(uint256& nHash) << std::endl; ); if (pGovObj->GetObjectType() != GOVERNANCE_OBJECT_TRIGGER) { - DBG( std::cout << "CSuperblock Constructor pHoObj not a trigger, returning" << std::endl; ); + DBG( std::cout << "CSuperblock Constructor pGovObj not a trigger, returning" << std::endl; ); throw std::runtime_error("CSuperblock: Governance Object not a trigger"); } diff --git a/src/governance-object.cpp b/src/governance-object.cpp index 4beb531f9..16c260e7d 100644 --- a/src/governance-object.cpp +++ b/src/governance-object.cpp @@ -103,7 +103,7 @@ bool CGovernanceObject::ProcessVote(CNode* pfrom, { if(!mnodeman.Has(vote.GetMasternodeOutpoint())) { std::ostringstream ostr; - ostr << "CGovernanceObject::ProcessVote -- Masternode index not found"; + ostr << "CGovernanceObject::ProcessVote -- Masternode " << vote.GetMasternodeOutpoint().ToStringShort() << " not found"; exception = CGovernanceException(ostr.str(), GOVERNANCE_EXCEPTION_WARNING); if(cmmapOrphanVotes.Insert(vote.GetMasternodeOutpoint(), vote_time_pair_t(vote, GetAdjustedTime() + GOVERNANCE_ORPHAN_EXPIRATION_TIME))) { if(pfrom) { diff --git a/src/governance.cpp b/src/governance.cpp index 29a2bbfd9..d8b91ce7f 100644 --- a/src/governance.cpp +++ b/src/governance.cpp @@ -334,7 +334,7 @@ void CGovernanceManager::AddGovernanceObject(CGovernanceObject& govobj, CConnman DBG( std::cout << "CGovernanceManager::AddGovernanceObject After AddNewTrigger" << std::endl; ); } - LogPrintf("AddGovernanceObject -- %s new, received form %s\n", strHash, pfrom? pfrom->GetAddrName() : "NULL"); + LogPrintf("CGovernanceManager::AddGovernanceObject -- %s new, received from %s\n", strHash, pfrom? pfrom->GetAddrName() : "NULL"); govobj.Relay(connman); // Update the rate buffer diff --git a/src/init.cpp b/src/init.cpp index 87ff72ad0..7e643b944 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1856,8 +1856,9 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler) LogPrintf("fLiteMode %d\n", fLiteMode); LogPrintf("nInstantSendDepth %d\n", nInstantSendDepth); #ifdef ENABLE_WALLET - LogPrintf("PrivateSend rounds %d\n", privateSendClient.nPrivateSendRounds); - LogPrintf("PrivateSend amount %d\n", privateSendClient.nPrivateSendAmount); + LogPrintf("PrivateSend liquidityprovider: %d\n", privateSendClient.nLiquidityProvider); + LogPrintf("PrivateSend rounds: %d\n", privateSendClient.nPrivateSendRounds); + LogPrintf("PrivateSend amount: %d\n", privateSendClient.nPrivateSendAmount); #endif // ENABLE_WALLET CPrivateSend::InitStandardDenominations(); diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp index d4a6887d4..4fd8b6c0f 100644 --- a/src/masternode-payments.cpp +++ b/src/masternode-payments.cpp @@ -499,6 +499,8 @@ bool CMasternodePayments::AddPaymentVote(const CMasternodePaymentVote& vote) mapMasternodeBlocks[vote.nBlockHeight].AddPayee(vote); + LogPrint("mnpayments", "CMasternodePayments::AddPaymentVote -- added, hash=%s\n", vote.GetHash().ToString()); + return true; } @@ -714,10 +716,10 @@ bool CMasternodePaymentVote::IsValid(CNode* pnode, int nValidationHeight, std::s if(nRank > MNPAYMENTS_SIGNATURES_TOTAL) { // It's common to have masternodes mistakenly think they are in the top 10 // We don't want to print all of these messages in normal mode, debug mode should print though - strError = strprintf("Masternode is not in the top %d (%d)", MNPAYMENTS_SIGNATURES_TOTAL, nRank); + strError = strprintf("Masternode %s is not in the top %d (%d)", masternodeOutpoint.ToStringShort(), MNPAYMENTS_SIGNATURES_TOTAL, nRank); // Only ban for new mnw which is out of bounds, for old mnw MN list itself might be way too much off if(nRank > MNPAYMENTS_SIGNATURES_TOTAL*2 && nBlockHeight > nValidationHeight) { - strError = strprintf("Masternode is not in the top %d (%d)", MNPAYMENTS_SIGNATURES_TOTAL*2, nRank); + strError = strprintf("Masternode %s is not in the top %d (%d)", masternodeOutpoint.ToStringShort(), MNPAYMENTS_SIGNATURES_TOTAL*2, nRank); LogPrintf("CMasternodePaymentVote::IsValid -- Error: %s\n", strError); Misbehaving(pnode->GetId(), 20); } @@ -971,7 +973,7 @@ void CMasternodePayments::RequestLowDataPaymentBlocks(CNode* pnode, CConnman& co vToFetch.push_back(CInv(MSG_MASTERNODE_PAYMENT_BLOCK, pindex->GetBlockHash())); // We should not violate GETDATA rules if(vToFetch.size() == MAX_INV_SZ) { - LogPrintf("CMasternodePayments::SyncLowDataPaymentBlocks -- asking peer=%d for %d blocks\n", pnode->id, MAX_INV_SZ); + LogPrintf("CMasternodePayments::RequestLowDataPaymentBlocks -- asking peer=%d for %d blocks\n", pnode->id, MAX_INV_SZ); connman.PushMessage(pnode, msgMaker.Make(NetMsgType::GETDATA, vToFetch)); // Start filling new batch vToFetch.clear(); @@ -1019,7 +1021,7 @@ void CMasternodePayments::RequestLowDataPaymentBlocks(CNode* pnode, CConnman& co } // We should not violate GETDATA rules if(vToFetch.size() == MAX_INV_SZ) { - LogPrintf("CMasternodePayments::SyncLowDataPaymentBlocks -- asking peer=%d for %d payment blocks\n", pnode->id, MAX_INV_SZ); + LogPrintf("CMasternodePayments::RequestLowDataPaymentBlocks -- asking peer=%d for %d payment blocks\n", pnode->id, MAX_INV_SZ); connman.PushMessage(pnode, msgMaker.Make(NetMsgType::GETDATA, vToFetch)); // Start filling new batch vToFetch.clear(); @@ -1028,7 +1030,7 @@ void CMasternodePayments::RequestLowDataPaymentBlocks(CNode* pnode, CConnman& co } // Ask for the rest of it if(!vToFetch.empty()) { - LogPrintf("CMasternodePayments::SyncLowDataPaymentBlocks -- asking peer=%d for %d payment blocks\n", pnode->id, vToFetch.size()); + LogPrintf("CMasternodePayments::RequestLowDataPaymentBlocks -- asking peer=%d for %d payment blocks\n", pnode->id, vToFetch.size()); connman.PushMessage(pnode, msgMaker.Make(NetMsgType::GETDATA, vToFetch)); } } diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp index d9b6c9982..e0c1ee610 100644 --- a/src/masternode-sync.cpp +++ b/src/masternode-sync.cpp @@ -151,7 +151,7 @@ void CMasternodeSync::ProcessTick(CConnman& connman) // reset the sync process if the last call to this function was more than 60 minutes ago (client was in sleep mode) static int64_t nTimeLastProcess = GetTime(); if(GetTime() - nTimeLastProcess > 60*60) { - LogPrintf("CMasternodeSync::HasSyncFailures -- WARNING: no actions for too long, restarting sync...\n"); + LogPrintf("CMasternodeSync::ProcessTick -- WARNING: no actions for too long, restarting sync...\n"); Reset(); SwitchToNextAsset(connman); nTimeLastProcess = GetTime(); @@ -162,7 +162,7 @@ void CMasternodeSync::ProcessTick(CConnman& connman) // reset sync status in case of any other sync failure if(IsFailed()) { if(nTimeLastFailure + (1*60) < GetTime()) { // 1 minute cooldown after failed sync - LogPrintf("CMasternodeSync::HasSyncFailures -- WARNING: failed to sync, trying again...\n"); + LogPrintf("CMasternodeSync::ProcessTick -- WARNING: failed to sync, trying again...\n"); Reset(); SwitchToNextAsset(connman); } diff --git a/src/privatesend-client.cpp b/src/privatesend-client.cpp index 59522a18e..8a906fe86 100644 --- a/src/privatesend-client.cpp +++ b/src/privatesend-client.cpp @@ -118,9 +118,6 @@ void CPrivateSendClient::ProcessMessage(CNode* pfrom, const std::string& strComm int nMsgMessageID; vRecv >> nMsgSessionID >> nMsgState >> nMsgEntriesCount >> nMsgStatusUpdate >> nMsgMessageID; - LogPrint("privatesend", "DSSTATUSUPDATE -- nMsgSessionID %d nMsgState: %d nEntriesCount: %d nMsgStatusUpdate: %d nMsgMessageID %d\n", - nMsgSessionID, nMsgState, nEntriesCount, nMsgStatusUpdate, nMsgMessageID); - if(nMsgState < POOL_STATE_MIN || nMsgState > POOL_STATE_MAX) { LogPrint("privatesend", "DSSTATUSUPDATE -- nMsgState is out of bounds: %d\n", nMsgState); return; @@ -136,7 +133,8 @@ void CPrivateSendClient::ProcessMessage(CNode* pfrom, const std::string& strComm return; } - LogPrint("privatesend", "DSSTATUSUPDATE -- GetMessageByID: %s\n", CPrivateSend::GetMessageByID(PoolMessage(nMsgMessageID))); + LogPrint("privatesend", "DSSTATUSUPDATE -- nMsgSessionID %d nMsgState: %d nEntriesCount: %d nMsgStatusUpdate: %d nMsgMessageID %d (%s)\n", + nMsgSessionID, nMsgState, nEntriesCount, nMsgStatusUpdate, nMsgMessageID, CPrivateSend::GetMessageByID(PoolMessage(nMsgMessageID))); if(!CheckPoolStateUpdate(PoolState(nMsgState), nMsgEntriesCount, PoolStatusUpdate(nMsgStatusUpdate), PoolMessage(nMsgMessageID), nMsgSessionID)) { LogPrint("privatesend", "DSSTATUSUPDATE -- CheckPoolStateUpdate failed\n"); @@ -1278,7 +1276,7 @@ bool CPrivateSendClient::CreateDenominated(const CompactTallyItem& tallyItem, bo CAmount nValueLeft = tallyItem.nAmount; nValueLeft -= CPrivateSend::GetCollateralAmount(); // leave some room for fees - LogPrintf("CreateDenominated0 nValueLeft: %f\n", (float)nValueLeft/COIN); + LogPrintf("CreateDenominated0: %s nValueLeft: %f\n", CBitcoinAddress(tallyItem.txdest).ToString(), (float)nValueLeft/COIN); // ****** Add an output for mixing collaterals ************ / diff --git a/src/privatesend-server.cpp b/src/privatesend-server.cpp index 8fd2625e2..4e43c1992 100644 --- a/src/privatesend-server.cpp +++ b/src/privatesend-server.cpp @@ -198,7 +198,7 @@ void CPrivateSendServer::ProcessMessage(CNode* pfrom, const std::string& strComm if(GetUTXOCoin(txin.prevout, coin)) { nValueIn += coin.out.nValue; } else { - LogPrintf("DSVIN -- missing input! tx=%s", tx.ToString()); + LogPrintf("DSVIN -- missing input! txin=%s\n", txin.ToString()); PushStatus(pfrom, STATUS_REJECTED, ERR_MISSING_TX, connman); return; } diff --git a/src/spork.cpp b/src/spork.cpp index 8efa45285..b6dec6764 100644 --- a/src/spork.cpp +++ b/src/spork.cpp @@ -49,7 +49,7 @@ void CSporkManager::ProcessSpork(CNode* pfrom, const std::string& strCommand, CD } if(!spork.CheckSignature()) { - LogPrintf("CSporkManager::ProcessSpork -- invalid signature\n"); + LogPrintf("CSporkManager::ProcessSpork -- ERROR: invalid signature\n"); Misbehaving(pfrom->GetId(), 100); return; } diff --git a/src/validation.cpp b/src/validation.cpp index 073b69645..6b7a0053e 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1020,10 +1020,11 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C // Remove conflicting transactions from the mempool BOOST_FOREACH(const CTxMemPool::txiter it, allConflicting) { - LogPrint("mempool", "replacing tx %s with %s for %s BTC additional fees, %d delta bytes\n", + LogPrint("mempool", "replacing tx %s with %s for %s %s additional fees, %d delta bytes\n", it->GetTx().GetHash().ToString(), hash.ToString(), FormatMoney(nModifiedFees - nConflictingFees), + CURRENCY_UNIT, (int)nSize - (int)nConflictingSize); } pool.RemoveStaged(allConflicting, false, MemPoolRemovalReason::REPLACED); @@ -1067,7 +1068,7 @@ bool AcceptToMemoryPoolWithTime(CTxMemPool& pool, CValidationState &state, const std::vector coins_to_uncache; bool res = AcceptToMemoryPoolWorker(pool, state, tx, fLimitFree, pfMissingInputs, nAcceptTime, fOverrideMempoolLimit, nAbsurdFee, coins_to_uncache, fDryRun); if (!res || fDryRun) { - if(!res) LogPrint("mempool", "%s: %s %s\n", __func__, tx->GetHash().ToString(), state.GetRejectReason()); + if(!res) LogPrint("mempool", "%s: %s %s (%s)\n", __func__, tx->GetHash().ToString(), state.GetRejectReason(), state.GetDebugMessage()); BOOST_FOREACH(const COutPoint& hashTx, coins_to_uncache) pcoinsTip->Uncache(hashTx); } @@ -1460,13 +1461,13 @@ void static InvalidChainFound(CBlockIndex* pindexNew) if (!pindexBestInvalid || pindexNew->nChainWork > pindexBestInvalid->nChainWork) pindexBestInvalid = pindexNew; - LogPrintf("%s: invalid block=%s height=%d log2_work=%.8g date=%s\n", __func__, + LogPrintf("%s: invalid block=%s height=%d log2_work=%.8f date=%s\n", __func__, pindexNew->GetBlockHash().ToString(), pindexNew->nHeight, log(pindexNew->nChainWork.getdouble())/log(2.0), DateTimeStrFormat("%Y-%m-%d %H:%M:%S", pindexNew->GetBlockTime())); CBlockIndex *tip = chainActive.Tip(); assert (tip); - LogPrintf("%s: current best=%s height=%d log2_work=%.8g date=%s\n", __func__, + LogPrintf("%s: current best=%s height=%d log2_work=%.8f date=%s\n", __func__, tip->GetBlockHash().ToString(), chainActive.Height(), log(tip->nChainWork.getdouble())/log(2.0), DateTimeStrFormat("%Y-%m-%d %H:%M:%S", tip->GetBlockTime())); CheckForkWarningConditions(); @@ -2560,7 +2561,7 @@ void static UpdateTip(CBlockIndex *pindexNew, const CChainParams& chainParams) { } } } - LogPrintf("%s: new best=%s height=%d version=0x%08x log2_work=%.8g tx=%lu date='%s' progress=%f cache=%.1fMiB(%utxo)", __func__, + LogPrintf("%s: new best=%s height=%d version=0x%08x log2_work=%.8f tx=%lu date='%s' progress=%f cache=%.1fMiB(%utxo)", __func__, chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), chainActive.Tip()->nVersion, log(chainActive.Tip()->nChainWork.getdouble())/log(2.0), (unsigned long)chainActive.Tip()->nChainTx, DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()),