mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 02:55:50 +00:00
Comment out non-working code.
This commit is contained in:
@@ -4,10 +4,6 @@
|
||||
#include "Config.h"
|
||||
#include "BitcoinUtil.h"
|
||||
|
||||
#include "json/json_spirit_utils.h"
|
||||
#include "json/json_spirit_writer_template.h"
|
||||
#include "json/json_spirit_reader_template.h"
|
||||
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/iostreams/concepts.hpp>
|
||||
#include <boost/iostreams/stream.hpp>
|
||||
@@ -54,7 +50,7 @@ string EncodeBase64(string s)
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
int commandLineRPC(int argc, char *argv[])
|
||||
{
|
||||
string strPrint;
|
||||
@@ -171,4 +167,5 @@ json_spirit::Object callRPC(const string& strMethod, const json_spirit::Array& p
|
||||
|
||||
return reply;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
5
RPC.h
5
RPC.h
@@ -1,4 +1,3 @@
|
||||
#include "json/json_spirit_value.h"
|
||||
|
||||
enum http_status_type
|
||||
{
|
||||
@@ -20,9 +19,11 @@ enum http_status_type
|
||||
service_unavailable = 503
|
||||
};
|
||||
|
||||
#if 0
|
||||
extern std::string JSONRPCRequest(const std::string& strMethod, const json_spirit::Array& params, const json_spirit::Value& id);
|
||||
extern std::string createHTTPPost(const std::string& strMsg, const std::map<std::string,std::string>& mapRequestHeaders);
|
||||
extern int ReadHTTP(std::basic_istream<char>& stream, std::map<std::string, std::string>& mapHeadersRet, std::string& strMessageRet);
|
||||
extern std::string HTTPReply(int nStatus, const std::string& strMsg);
|
||||
extern std::string JSONRPCReply(const json_spirit::Value& result, const json_spirit::Value& error, const json_spirit::Value& id);
|
||||
extern json_spirit::Object JSONRPCError(int code, const std::string& message);
|
||||
extern json_spirit::Object JSONRPCError(int code, const std::string& message);
|
||||
#endif
|
||||
|
||||
@@ -6,13 +6,10 @@
|
||||
//#include <boost/log/trivial.hpp>
|
||||
#include "Application.h"
|
||||
#include <iostream>
|
||||
#include "json/json_spirit_reader_template.h"
|
||||
#include "json/json_spirit_writer_template.h"
|
||||
#include "RPC.h"
|
||||
#include "Conversion.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace json_spirit;
|
||||
|
||||
/*
|
||||
Just read from wire until the entire request is in.
|
||||
@@ -45,7 +42,7 @@ void RPCServer::handle_read(const boost::system::error_code& e,
|
||||
|
||||
if(result)
|
||||
{
|
||||
mReplyStr=handleRequest(mIncomingRequest.mBody);
|
||||
// mReplyStr=handleRequest(mIncomingRequest.mBody);
|
||||
sendReply();
|
||||
}else if(!result)
|
||||
{ // bad request
|
||||
@@ -65,6 +62,7 @@ void RPCServer::handle_read(const boost::system::error_code& e,
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
std::string RPCServer::handleRequest(std::string& requestStr)
|
||||
{
|
||||
cout << "handleRequest " << requestStr << endl;
|
||||
@@ -139,6 +137,7 @@ Value RPCServer::doCommand(std::string& command, Array& params)
|
||||
|
||||
return "unknown command";
|
||||
}
|
||||
#endif
|
||||
|
||||
void RPCServer::sendReply()
|
||||
{
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
#include <boost/asio.hpp>
|
||||
#include "json/json_spirit_utils.h"
|
||||
|
||||
class RPCServer : public boost::enable_shared_from_this<RPCServer>
|
||||
{
|
||||
@@ -25,7 +24,7 @@ class RPCServer : public boost::enable_shared_from_this<RPCServer>
|
||||
std::string handleRequest(std::string& requestStr);
|
||||
void sendReply();
|
||||
|
||||
json_spirit::Value doCommand(std::string& command,json_spirit::Array& params);
|
||||
// json_spirit::Value doCommand(std::string& command,json_spirit::Array& params);
|
||||
|
||||
public:
|
||||
typedef boost::shared_ptr<RPCServer> pointer;
|
||||
|
||||
@@ -96,9 +96,6 @@
|
||||
<ClCompile Include="database\sqlite3.c" />
|
||||
<ClCompile Include="database\SqliteDatabase.cpp" />
|
||||
<ClCompile Include="DeterministicKeys.cpp" />
|
||||
<ClCompile Include="json\json_spirit_reader.cpp" />
|
||||
<ClCompile Include="json\json_spirit_value.cpp" />
|
||||
<ClCompile Include="json\json_spirit_writer.cpp" />
|
||||
<ClCompile Include="KnownNodeList.cpp" />
|
||||
<ClCompile Include="Ledger.cpp" />
|
||||
<ClCompile Include="LedgerHistory.cpp" />
|
||||
@@ -148,15 +145,6 @@
|
||||
<ClInclude Include="database\SqliteDatabase.h" />
|
||||
<ClInclude Include="HttpReply.h" />
|
||||
<ClInclude Include="HttpRequest.h" />
|
||||
<ClInclude Include="json\json_spirit.h" />
|
||||
<ClInclude Include="json\json_spirit_error_position.h" />
|
||||
<ClInclude Include="json\json_spirit_reader.h" />
|
||||
<ClInclude Include="json\json_spirit_reader_template.h" />
|
||||
<ClInclude Include="json\json_spirit_stream_reader.h" />
|
||||
<ClInclude Include="json\json_spirit_utils.h" />
|
||||
<ClInclude Include="json\json_spirit_value.h" />
|
||||
<ClInclude Include="json\json_spirit_writer.h" />
|
||||
<ClInclude Include="json\json_spirit_writer_template.h" />
|
||||
<ClInclude Include="key.h" />
|
||||
<ClInclude Include="KnownNodeList.h" />
|
||||
<ClInclude Include="Ledger.h" />
|
||||
|
||||
10
rpc.cpp
10
rpc.cpp
@@ -8,22 +8,18 @@
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#include "json/json_spirit_reader_template.h"
|
||||
#include "json/json_spirit_writer_template.h"
|
||||
#include "json/json_spirit_utils.h"
|
||||
#include <openssl/buffer.h>
|
||||
#include <openssl/evp.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace boost;
|
||||
using namespace boost::asio;
|
||||
using namespace json_spirit;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
Object JSONRPCError(int code, const string& message)
|
||||
{
|
||||
Object error;
|
||||
@@ -33,7 +29,6 @@ Object JSONRPCError(int code, const string& message)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// HTTP protocol
|
||||
//
|
||||
@@ -45,7 +40,7 @@ string createHTTPPost(const string& strMsg, const map<string,string>& mapRequest
|
||||
{
|
||||
ostringstream s;
|
||||
s << "POST / HTTP/1.1\r\n"
|
||||
<< "User-Agent: bitcoin-json-rpc/" << FormatFullVersion() << "\r\n"
|
||||
<< "User-Agent: coin-json-rpc/" << FormatFullVersion() << "\r\n"
|
||||
<< "Host: 127.0.0.1\r\n"
|
||||
<< "Content-Type: application/json\r\n"
|
||||
<< "Content-Length: " << strMsg.size() << "\r\n"
|
||||
@@ -278,3 +273,4 @@ void ConvertTo(Value& value)
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user