20 #include <ripple/app/main/Application.h>
21 #include <ripple/app/misc/NetworkOPs.h>
22 #include <ripple/json/json_value.h>
23 #include <ripple/net/RPCErr.h>
24 #include <ripple/nodestore/DatabaseShard.h>
25 #include <ripple/protocol/ErrorCodes.h>
26 #include <ripple/protocol/jss.h>
27 #include <ripple/rpc/Context.h>
47 auto const action = [&context] {
49 boost::to_lower(value);
63 if (action ==
"status")
66 return shardStore->getDatabaseImportStatus();
68 else if (action ==
"start")
71 return shardStore->startNodeToShard();
73 else if (action ==
"stop")
76 return shardStore->stopNodeToShard();
Json::Value rpcError(int iError)
virtual NodeStore::DatabaseShard * getShardStore()=0
@ rpcREPORTING_UNSUPPORTED
Json::Value missing_field_error(std::string const &name)
virtual Config & config()=0
bool isMember(const char *key) const
Return true if the object has a member named key.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Json::Value doNodeToShard(RPC::JsonContext &)
Json::Value invalid_field_error(std::string const &name)
Json::Value make_error(error_code_i code)
Returns a new json object that reflects the error code.
std::string asString() const
Returns the unquoted string value.