From 1d05f5a5bd8bb061c2aaf974988294428e47c74f Mon Sep 17 00:00:00 2001 From: jed Date: Mon, 18 Jun 2012 17:51:58 -0700 Subject: [PATCH 1/5] vs project file --- newcoin.vcxproj | 1 + newcoin.vcxproj.filters | 3 +++ 2 files changed, 4 insertions(+) diff --git a/newcoin.vcxproj b/newcoin.vcxproj index 830dc5098c..6e42918bb2 100644 --- a/newcoin.vcxproj +++ b/newcoin.vcxproj @@ -150,6 +150,7 @@ + diff --git a/newcoin.vcxproj.filters b/newcoin.vcxproj.filters index 41af172d3c..9b6d58391f 100644 --- a/newcoin.vcxproj.filters +++ b/newcoin.vcxproj.filters @@ -237,6 +237,9 @@ Source Files + + Source Files + From 83795f086cbef7646c86e4bd46323e5bb5b2c3f4 Mon Sep 17 00:00:00 2001 From: jed Date: Mon, 18 Jun 2012 19:43:43 -0700 Subject: [PATCH 2/5] . --- src/ConnectionPool.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ConnectionPool.cpp b/src/ConnectionPool.cpp index cfdad9432a..224331de27 100644 --- a/src/ConnectionPool.cpp +++ b/src/ConnectionPool.cpp @@ -163,7 +163,7 @@ void ConnectionPool::policyEnforce() { boost::posix_time::ptime tpNow = boost::posix_time::second_clock::universal_time(); - std::cerr << "policyEnforce: begin: " << tpNow << std::endl; + //std::cerr << "policyEnforce: begin: " << tpNow << std::endl; // Cancel any in progrss timer. (void) mPolicyTimer.cancel(); @@ -176,7 +176,7 @@ void ConnectionPool::policyEnforce() tpNext = boost::posix_time::second_clock::universal_time()+boost::posix_time::seconds(POLICY_INTERVAL_SECONDS); - std::cerr << "policyEnforce: schedule : " << tpNext << std::endl; + //std::cerr << "policyEnforce: schedule : " << tpNext << std::endl; mPolicyTimer.expires_at(tpNext); mPolicyTimer.async_wait(boost::bind(&ConnectionPool::policyHandler, this, _1)); From f6bc82dd049fb5faacc15aef761be294c1d9804b Mon Sep 17 00:00:00 2001 From: jed Date: Tue, 19 Jun 2012 04:38:52 -0700 Subject: [PATCH 3/5] . --- newcoin.vcxproj | 1 + newcoin.vcxproj.filters | 3 +++ 2 files changed, 4 insertions(+) diff --git a/newcoin.vcxproj b/newcoin.vcxproj index 6e42918bb2..975e16da8e 100644 --- a/newcoin.vcxproj +++ b/newcoin.vcxproj @@ -144,6 +144,7 @@ + diff --git a/newcoin.vcxproj.filters b/newcoin.vcxproj.filters index 9b6d58391f..0d25cfe28b 100644 --- a/newcoin.vcxproj.filters +++ b/newcoin.vcxproj.filters @@ -240,6 +240,9 @@ Source Files + + Source Files + From d9a930596bb9011355987929276072dbc8be5c72 Mon Sep 17 00:00:00 2001 From: jed Date: Tue, 19 Jun 2012 04:56:44 -0700 Subject: [PATCH 4/5] fix iter bug --- src/LedgerAcquire.cpp | 2 +- src/Suppression.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/LedgerAcquire.cpp b/src/LedgerAcquire.cpp index be389a4eb1..2e482eb740 100644 --- a/src/LedgerAcquire.cpp +++ b/src/LedgerAcquire.cpp @@ -254,7 +254,7 @@ void PeerSet::sendRequest(const newcoin::TMGetLedger& tmGL) while (it != mPeers.end()) { if (it->expired()) - mPeers.erase(it++); + it=mPeers.erase(it); else { // FIXME: Track last peer sent to and time sent diff --git a/src/Suppression.cpp b/src/Suppression.cpp index 7ed36b5676..64865bb4f7 100644 --- a/src/Suppression.cpp +++ b/src/Suppression.cpp @@ -15,10 +15,10 @@ bool SuppressionTable::addSuppression(const uint160& suppression) { if ((it->first + mHoldTime) < now) { - for (std::list::iterator lit = it->second.begin(), end = it->second.end(); + for (std::list::iterator lit = it->second.begin(), end = it->second.end(); lit != end; ++lit) mSuppressionMap.erase(*lit); - mSuppressionTimes.erase(it++); + it=mSuppressionTimes.erase(it); } else ++it; } From 00e8a930ff4636b4ab0b70341af2aa5531451906 Mon Sep 17 00:00:00 2001 From: jed Date: Tue, 19 Jun 2012 12:34:57 -0700 Subject: [PATCH 5/5] changed server_info RPC --- src/NetworkOPs.cpp | 14 +++++++------- src/RPCServer.cpp | 4 +++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/NetworkOPs.cpp b/src/NetworkOPs.cpp index e96a0d4306..bf6c086b40 100644 --- a/src/NetworkOPs.cpp +++ b/src/NetworkOPs.cpp @@ -620,15 +620,15 @@ Json::Value NetworkOPs::getServerInfo() switch (mMode) { - case omDISCONNECTED: info["network_state"] = "disconected"; break; - case omCONNECTED: info["network_state"] = "connected"; break; - case omTRACKING: info["network_state"] = "tracking"; break; - case omFULL: info["network_state"] = "validating"; break; - default: info["network_state"] = "unknown"; + case omDISCONNECTED: info["serverState"] = "disconnected"; break; + case omCONNECTED: info["serverState"] = "connected"; break; + case omTRACKING: info["serverState"] = "tracking"; break; + case omFULL: info["serverState"] = "validating"; break; + default: info["serverState"] = "unknown"; } - if (!theConfig.VALIDATION_SEED.isValid()) info["validation_seed"] = "none"; - else info["validation_seed"] = NewcoinAddress::createNodePublic(theConfig.VALIDATION_SEED).humanNodePublic(); + if (!theConfig.VALIDATION_SEED.isValid()) info["serverState"] = "none"; + else info["validationPKey"] = NewcoinAddress::createNodePublic(theConfig.VALIDATION_SEED).humanNodePublic(); return info; } diff --git a/src/RPCServer.cpp b/src/RPCServer.cpp index d3b84fb753..46dcb53b2f 100644 --- a/src/RPCServer.cpp +++ b/src/RPCServer.cpp @@ -1233,7 +1233,9 @@ Json::Value RPCServer::doSend(Json::Value& params) Json::Value RPCServer::doServerInfo(Json::Value& params) { - return theApp->getOPs().getServerInfo(); + Json::Value ret(Json::objectValue); + ret["info"]=theApp->getOPs().getServerInfo(); + return ret; } // transit_set