Conflict was resolved

This commit is contained in:
moss9001 2021-10-22 19:48:17 +03:00
commit 80159ce19b
4 changed files with 14 additions and 4 deletions

View file

@ -44,7 +44,7 @@ endif()
unset(ENABLE_PEERPLAYS_ASSET_DEPOSITS)
unset(ENABLE_PEERPLAYS_ASSET_DEPOSITS CACHE)
target_link_libraries( peerplays_sidechain PRIVATE graphene_plugin zmq )
target_link_libraries( peerplays_sidechain PRIVATE curl graphene_plugin zmq )
target_include_directories( peerplays_sidechain
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" )

View file

@ -1,6 +1,7 @@
#include <graphene/peerplays_sidechain/common/rpc_client.hpp>
#include <sstream>
#include <string>
#include <boost/asio.hpp>
#include <boost/asio/buffer.hpp>
@ -9,9 +10,11 @@
#include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/ptree.hpp>
#include <curl/curl.h>
#include <fc/crypto/base64.hpp>
#include <fc/log/logger.hpp>
#include <fc/network/ip.hpp>
//#include <fc/network/ip.hpp>
#include <boost/algorithm/string/case_conv.hpp>
#include <boost/algorithm/string/trim.hpp>
@ -489,6 +492,7 @@ fc::http::reply rpc_client::send_post_request(std::string body, bool show_log) {
}
if (show_log) {
std::string url = ip + ":" + std::to_string(port);
ilog("### Request URL: ${url}", ("url", url));
ilog("### Request: ${body}", ("body", body));
std::stringstream ss(std::string(reply.body.begin(), reply.body.end()));

View file

@ -7,6 +7,11 @@
namespace graphene { namespace peerplays_sidechain {
struct rpc_reply {
uint16_t status;
std::string body;
};
class rpc_client {
public:
rpc_client(std::string _ip, uint32_t _port, std::string _user, std::string _password, bool _debug_rpc_calls);
@ -27,7 +32,8 @@ protected:
fc::http::header authorization;
private:
fc::http::reply send_post_request(std::string body, bool show_log);
//fc::http::reply send_post_request(std::string body, bool show_log);
rpc_reply send_post_request(std::string body, bool show_log);
};
}} // namespace graphene::peerplays_sidechain

View file

@ -37,7 +37,7 @@ hive_node_rpc_client::hive_node_rpc_client(std::string _ip, uint32_t _port, std:
}
std::string hive_node_rpc_client::account_history_api_get_transaction(std::string transaction_id) {
std::string params = "{ \"id\": \"" + transaction_id + "\" }";
std::string params = "{ \"id\": \"" + transaction_id + "\", \"include_reversible\": \"true\" }";
return send_post_request("account_history_api.get_transaction", params, debug_rpc_calls);
}