From 58bcb321d9d96dc8e10b8ff4f6e5a9079d295307 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Mon, 16 Feb 2015 02:01:06 +0300 Subject: [PATCH] fix log output / more notCapableReason-s --- src/activemasternode.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp index 2fe417439..3743b0cbc 100644 --- a/src/activemasternode.cpp +++ b/src/activemasternode.cpp @@ -43,7 +43,7 @@ void CActiveMasternode::ManageStatus() if(Params().NetworkID() == CChainParams::MAIN){ if(service.GetPort() != 9999) { - notCapableReason = "Invalid port: " + boost::lexical_cast(service.GetPort()) + " -only 9999 is supported on mainnet."; + notCapableReason = "Invalid port: " + boost::lexical_cast(service.GetPort()) + " - only 9999 is supported on mainnet."; status = MASTERNODE_NOT_CAPABLE; LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason.c_str()); return; @@ -77,7 +77,9 @@ void CActiveMasternode::ManageStatus() if(GetMasterNodeVin(vin, pubKeyCollateralAddress, keyCollateralAddress)) { if(GetInputAge(vin) < MASTERNODE_MIN_CONFIRMATIONS){ - LogPrintf("CActiveMasternode::ManageStatus() - Input must have least %d confirmations - %d confirmations\n", MASTERNODE_MIN_CONFIRMATIONS, GetInputAge(vin)); + notCapableReason = "Input must have least " + boost::lexical_cast(MASTERNODE_MIN_CONFIRMATIONS) + + " confirmations - " + boost::lexical_cast(GetInputAge(vin)) + " confirmations"; + LogPrintf("CActiveMasternode::ManageStatus() - %s\n", notCapableReason.c_str()); status = MASTERNODE_INPUT_TOO_NEW; return; } @@ -100,18 +102,19 @@ void CActiveMasternode::ManageStatus() } if(!Register(vin, service, keyCollateralAddress, pubKeyCollateralAddress, keyMasternode, pubKeyMasternode, errorMessage)) { - LogPrintf("CActiveMasternode::ManageStatus() - Error on Register: %s", errorMessage.c_str()); + LogPrintf("CActiveMasternode::ManageStatus() - Error on Register: %s\n", errorMessage.c_str()); } return; } else { - LogPrintf("CActiveMasternode::ManageStatus() - Could not find suitable coins!\n"); + notCapableReason = "Could not find suitable coins!"; + LogPrintf("CActiveMasternode::ManageStatus() - %s\n", notCapableReason.c_str()); } } //send to all peers if(!Dseep(errorMessage)) { - LogPrintf("CActiveMasternode::ManageStatus() - Error on Ping: %s", errorMessage.c_str()); + LogPrintf("CActiveMasternode::ManageStatus() - Error on Ping: %s\n", errorMessage.c_str()); } }