Rename UNL methods.

This commit is contained in:
Arthur Britto
2012-04-03 22:48:57 -07:00
parent d72b670afc
commit 8d23d1de40
3 changed files with 17 additions and 13 deletions

View File

@@ -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";
}

View File

@@ -1,7 +1,8 @@
#include "UniqueNodeList.h"
#include "Application.h"
#include "Conversion.h"
#include "HttpsClient.h"
#include "ParseSection.h"
#include "UniqueNodeList.h"
#include <boost/asio.hpp>
#include <boost/bind.hpp>
@@ -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

View File

@@ -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);