From 8d23d1de40222efac07ddedc3a8d3de61fa933f4 Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Tue, 3 Apr 2012 22:48:57 -0700 Subject: [PATCH] Rename UNL methods. --- src/RPCServer.cpp | 8 ++++---- src/UniqueNodeList.cpp | 14 +++++++++----- src/UniqueNodeList.h | 8 ++++---- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/RPCServer.cpp b/src/RPCServer.cpp index 661ca3f629..27875d9100 100644 --- a/src/RPCServer.cpp +++ b/src/RPCServer.cpp @@ -519,7 +519,7 @@ Json::Value RPCServer::doUnlAdd(Json::Value& params) { if(nodePublic.setNodePublic(strNodePublic)) { - theApp->getUNL().addNode(nodePublic, strComment); + theApp->getUNL().nodeAdd(nodePublic, strComment); return "adding node"; } @@ -605,7 +605,7 @@ Json::Value RPCServer::doUnlDelete(Json::Value& params) { if(hanko.setHanko(strHanko)) { - theApp->getUNL().removeNode(hanko); + theApp->getUNL().nodeRemove(hanko); return "removing node"; } @@ -622,7 +622,7 @@ Json::Value RPCServer::doUnlFetch(Json::Value& params) { { std::string strDomain=params[0u].asString(); - theApp->getUNL().fetchNode(strDomain); + theApp->getUNL().nodeFetch(strDomain); return "fetching domain"; } @@ -637,7 +637,7 @@ Json::Value RPCServer::doUnlList(Json::Value& params) { Json::Value RPCServer::doUnlReset(Json::Value& params) { if(!params.size()) { - theApp->getUNL().reset(); + theApp->getUNL().nodeReset(); return "removing nodes"; } diff --git a/src/UniqueNodeList.cpp b/src/UniqueNodeList.cpp index 7bfe85e172..cac906dcfa 100644 --- a/src/UniqueNodeList.cpp +++ b/src/UniqueNodeList.cpp @@ -1,7 +1,8 @@ -#include "UniqueNodeList.h" #include "Application.h" #include "Conversion.h" #include "HttpsClient.h" +#include "ParseSection.h" +#include "UniqueNodeList.h" #include #include @@ -72,7 +73,7 @@ void UniqueNodeList::fetchNext() } // Get newcoin.txt from a domain's web server. -void UniqueNodeList::fetchNode(std::string strDomain) +void UniqueNodeList::nodeFetch(std::string strDomain) { { boost::mutex::scoped_lock sl(mFetchLock); @@ -83,7 +84,7 @@ void UniqueNodeList::fetchNode(std::string strDomain) fetchNext(); } -void UniqueNodeList::addNode(NewcoinAddress naNodePublic, std::string strComment) +void UniqueNodeList::nodeAdd(NewcoinAddress naNodePublic, std::string strComment) { Database* db=theApp->getWalletDB()->getDB(); @@ -106,7 +107,7 @@ void UniqueNodeList::addNode(NewcoinAddress naNodePublic, std::string strComment db->executeSQL(strSql.c_str()); } -void UniqueNodeList::removeNode(NewcoinAddress naHanko) +void UniqueNodeList::nodeRemove(NewcoinAddress naHanko) { Database* db=theApp->getWalletDB()->getDB(); @@ -121,7 +122,7 @@ void UniqueNodeList::removeNode(NewcoinAddress naHanko) db->executeSQL(strSql.c_str()); } -void UniqueNodeList::reset() +void UniqueNodeList::nodeReset() { Database* db=theApp->getWalletDB()->getDB(); @@ -200,5 +201,8 @@ void UniqueNodeList::nodeDefault(std::string strValidators) { std::cerr << strValidators; std::cerr << "Validators<" << std::endl; + section secValidators = ParseSection(strValidators, true); + + PrintSection(secValidators); } // vim:ts=4 diff --git a/src/UniqueNodeList.h b/src/UniqueNodeList.h index 2300781da3..d53b058299 100644 --- a/src/UniqueNodeList.h +++ b/src/UniqueNodeList.h @@ -35,11 +35,11 @@ private: public: UniqueNodeList(); - void addNode(NewcoinAddress naNodePublic, std::string strComment); - void fetchNode(std::string strDomain); - void removeNode(NewcoinAddress naHanko); - void reset(); + void nodeAdd(NewcoinAddress naNodePublic, std::string strComment); + void nodeFetch(std::string strDomain); + void nodeRemove(NewcoinAddress naHanko); void nodeDefault(std::string strValidators); + void nodeReset(); // 2- we don't care, 1- we care and is valid, 2-invalid signature // int checkValid(newcoin::Validation& valid);