mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Cleanups.
This commit is contained in:
@@ -510,9 +510,11 @@ Json::Value RPCServer::doLedger(Json::Value& params)
|
||||
|
||||
if(paramCount == 0);
|
||||
{
|
||||
Json::Value ret(Json::objectValue);
|
||||
theApp->getMasterLedger().getCurrentLedger()->addJson(ret);
|
||||
theApp->getMasterLedger().getClosingLedger()->addJson(ret);
|
||||
Json::Value ret(Json::objectValue), current(Json::objectValue), closed(Json::objectValue);
|
||||
theApp->getMasterLedger().getCurrentLedger()->addJson(current);
|
||||
theApp->getMasterLedger().getClosedLedger()->addJson(closed);
|
||||
ret["open"] = current;
|
||||
ret["closed"] = closed;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -520,13 +522,12 @@ Json::Value RPCServer::doLedger(Json::Value& params)
|
||||
}
|
||||
|
||||
// unl_add <domain><node_public> [<comment>]
|
||||
Json::Value RPCServer::doUnlAdd(Json::Value& params) {
|
||||
Json::Value RPCServer::doUnlAdd(Json::Value& params)
|
||||
{
|
||||
if (params.size() == 1 || params.size() == 2)
|
||||
{
|
||||
std::string strNode = params[0u].asString();
|
||||
std::string strComment=params.size() == 2
|
||||
? ""
|
||||
: params[1u].asString();
|
||||
std::string strComment = (params.size() == 2) ? "" : params[1u].asString();
|
||||
|
||||
NewcoinAddress nodePublic;
|
||||
|
||||
@@ -543,7 +544,7 @@ Json::Value RPCServer::doUnlAdd(Json::Value& params) {
|
||||
return "adding node by domain";
|
||||
}
|
||||
}
|
||||
else return "invalid params";
|
||||
return "invalid params";
|
||||
}
|
||||
|
||||
// validation_create
|
||||
|
||||
Reference in New Issue
Block a user