Use newcoind.cfg instead of config.xml

This commit is contained in:
Arthur Britto
2012-04-06 22:27:14 -07:00
parent 3883777249
commit bcdd8ab519
7 changed files with 67 additions and 20 deletions

View File

@@ -126,7 +126,7 @@ Json::Value callRPC(const std::string& strMethod, const Json::Value& params)
// Connect to localhost
std::cout << "Connecting to port:" << theConfig.RPC_PORT << std::endl;
ip::tcp::endpoint endpoint( ip::address::from_string("127.0.0.1"), theConfig.RPC_PORT);
ip::tcp::endpoint endpoint(ip::address::from_string(theConfig.RPC_IP), theConfig.RPC_PORT);
ip::tcp::iostream stream;
stream.connect(endpoint);
if(stream.fail())
@@ -142,11 +142,11 @@ Json::Value callRPC(const std::string& strMethod, const Json::Value& params)
// Send request
std::string strRequest = JSONRPCRequest(strMethod, params, Json::Value(1));
std::cout << "send request " << strMethod << " : " << strRequest << std::endl;
std::cout << "send request " << strMethod << " : " << strRequest << std::endl;
std::string strPost = createHTTPPost(strRequest, mapRequestHeaders);
stream << strPost << std::flush;
std::cout << "post " << strPost << std::endl;
std::cout << "post " << strPost << std::endl;
// Receive reply
std::map<std::string, std::string> mapHeaders;