mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
add simple log rotating, tentative Ripple pathfinder work
This commit is contained in:
@@ -14,6 +14,11 @@
|
||||
#include "Log.h"
|
||||
#include "RippleLines.h"
|
||||
|
||||
#include "Pathfinder.h"
|
||||
#include "Conversion.h"
|
||||
|
||||
extern uint160 humanTo160(const std::string& buf);
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
@@ -1795,6 +1800,16 @@ Json::Value RPCServer::doSend(const Json::Value& params)
|
||||
|
||||
STPathSet spsPaths;
|
||||
|
||||
uint160 srcCurrencyID;
|
||||
bool ret_b;
|
||||
ret_b = false;
|
||||
STAmount::currencyFromString(srcCurrencyID, sSrcCurrency);
|
||||
|
||||
Pathfinder pf(naSrcAccountID, naDstAccountID, srcCurrencyID, saDstAmount);
|
||||
|
||||
ret_b = pf.findPaths(5, 1, spsPaths);
|
||||
// TODO: Nope; the above can't be right
|
||||
|
||||
trans = Transaction::sharedPayment(
|
||||
naAccountPublic, naAccountPrivate,
|
||||
naSrcAccountID,
|
||||
@@ -2518,6 +2533,11 @@ Json::Value RPCServer::doLogin(const Json::Value& params)
|
||||
}
|
||||
}
|
||||
|
||||
Json::Value RPCServer::doLogRotate(const Json::Value& params)
|
||||
{
|
||||
return Log::rotateLog();
|
||||
}
|
||||
|
||||
Json::Value RPCServer::doCommand(const std::string& command, Json::Value& params)
|
||||
{
|
||||
Log(lsTRACE) << "RPC:" << command;
|
||||
@@ -2543,6 +2563,7 @@ Json::Value RPCServer::doCommand(const std::string& command, Json::Value& params
|
||||
{ "data_fetch", &RPCServer::doDataFetch, 1, 1, true },
|
||||
{ "data_store", &RPCServer::doDataStore, 2, 2, true },
|
||||
{ "ledger", &RPCServer::doLedger, 0, 2, false, optNetwork },
|
||||
{ "logrotate", &RPCServer::doLogRotate, 0, 0, true, optCurrent },
|
||||
{ "nickname_info", &RPCServer::doNicknameInfo, 1, 1, false, optCurrent },
|
||||
{ "nickname_set", &RPCServer::doNicknameSet, 2, 3, false, optCurrent },
|
||||
{ "offer_create", &RPCServer::doOfferCreate, 9, 10, false, optCurrent },
|
||||
|
||||
Reference in New Issue
Block a user