fix compilation
This commit is contained in:
parent
851f359cf8
commit
af3738782d
7 changed files with 21 additions and 13 deletions
|
|
@ -244,7 +244,7 @@ namespace detail {
|
||||||
|
|
||||||
void new_connection( const fc::http::websocket_connection_ptr& c )
|
void new_connection( const fc::http::websocket_connection_ptr& c )
|
||||||
{
|
{
|
||||||
auto wsc = std::make_shared<fc::rpc::websocket_api_connection>(c);
|
auto wsc = std::make_shared<fc::rpc::websocket_api_connection>(*c, 1);
|
||||||
auto login = std::make_shared<graphene::app::login_api>( std::ref(*_self) );
|
auto login = std::make_shared<graphene::app::login_api>( std::ref(*_self) );
|
||||||
login->enable_api("database_api");
|
login->enable_api("database_api");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
#include <fc/log/console_appender.hpp>
|
#include <fc/log/console_appender.hpp>
|
||||||
#include <fc/log/file_appender.hpp>
|
#include <fc/log/file_appender.hpp>
|
||||||
#include <fc/log/logger_config.hpp>
|
#include <fc/log/logger_config.hpp>
|
||||||
|
#include <fc/log/logger.hpp>
|
||||||
|
|
||||||
#include <boost/property_tree/ptree.hpp>
|
#include <boost/property_tree/ptree.hpp>
|
||||||
#include <boost/property_tree/ini_parser.hpp>
|
#include <boost/property_tree/ini_parser.hpp>
|
||||||
|
|
@ -150,8 +151,8 @@ static fc::optional<fc::logging_config> load_logging_config_from_ini_file(const
|
||||||
console_appender_config.level_colors.emplace_back(
|
console_appender_config.level_colors.emplace_back(
|
||||||
fc::console_appender::level_color(fc::log_level::error,
|
fc::console_appender::level_color(fc::log_level::error,
|
||||||
fc::console_appender::color::cyan));
|
fc::console_appender::color::cyan));
|
||||||
console_appender_config.stream = fc::variant(stream_name).as<fc::console_appender::stream::type>();
|
console_appender_config.stream = fc::variant(stream_name).as<fc::console_appender::stream::type>(GRAPHENE_MAX_NESTED_OBJECTS);
|
||||||
logging_config.appenders.push_back(fc::appender_config(console_appender_name, "console", fc::variant(console_appender_config)));
|
logging_config.appenders.push_back(fc::appender_config(console_appender_name, "console", fc::variant(console_appender_config, 1)));
|
||||||
found_logging_config = true;
|
found_logging_config = true;
|
||||||
}
|
}
|
||||||
else if (boost::starts_with(section_name, file_appender_section_prefix))
|
else if (boost::starts_with(section_name, file_appender_section_prefix))
|
||||||
|
|
@ -172,7 +173,7 @@ static fc::optional<fc::logging_config> load_logging_config_from_ini_file(const
|
||||||
file_appender_config.rotate = true;
|
file_appender_config.rotate = true;
|
||||||
file_appender_config.rotation_interval = fc::minutes(interval);
|
file_appender_config.rotation_interval = fc::minutes(interval);
|
||||||
file_appender_config.rotation_limit = fc::days(limit);
|
file_appender_config.rotation_limit = fc::days(limit);
|
||||||
logging_config.appenders.push_back(fc::appender_config(file_appender_name, "file", fc::variant(file_appender_config)));
|
logging_config.appenders.push_back(fc::appender_config(file_appender_name, "file", fc::variant(file_appender_config, 1)));
|
||||||
found_logging_config = true;
|
found_logging_config = true;
|
||||||
}
|
}
|
||||||
else if (boost::starts_with(section_name, logger_section_prefix))
|
else if (boost::starts_with(section_name, logger_section_prefix))
|
||||||
|
|
@ -181,7 +182,7 @@ static fc::optional<fc::logging_config> load_logging_config_from_ini_file(const
|
||||||
std::string level_string = section_tree.get<std::string>("level");
|
std::string level_string = section_tree.get<std::string>("level");
|
||||||
std::string appenders_string = section_tree.get<std::string>("appenders");
|
std::string appenders_string = section_tree.get<std::string>("appenders");
|
||||||
fc::logger_config logger_config(logger_name);
|
fc::logger_config logger_config(logger_name);
|
||||||
logger_config.level = fc::variant(level_string).as<fc::log_level>();
|
logger_config.level = fc::variant(level_string).as<fc::log_level>(1);
|
||||||
boost::split(logger_config.appenders, appenders_string,
|
boost::split(logger_config.appenders, appenders_string,
|
||||||
boost::is_any_of(" ,"),
|
boost::is_any_of(" ,"),
|
||||||
boost::token_compress_on);
|
boost::token_compress_on);
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ void delayed_node_plugin::plugin_set_program_options(bpo::options_description& c
|
||||||
|
|
||||||
void delayed_node_plugin::connect()
|
void delayed_node_plugin::connect()
|
||||||
{
|
{
|
||||||
my->client_connection = std::make_shared<fc::rpc::websocket_api_connection>(my->client.connect(my->remote_endpoint));
|
my->client_connection = std::make_shared<fc::rpc::websocket_api_connection>(*(my->client.connect(my->remote_endpoint)), 1);
|
||||||
my->database_api = my->client_connection->get_remote_api<graphene::app::database_api>(0);
|
my->database_api = my->client_connection->get_remote_api<graphene::app::database_api>(0);
|
||||||
my->client_connection_closed = my->client_connection->closed.connect([this] {
|
my->client_connection_closed = my->client_connection->closed.connect([this] {
|
||||||
connection_failed();
|
connection_failed();
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,7 @@ int main( int argc, char** argv )
|
||||||
fc::http::websocket_client client;
|
fc::http::websocket_client client;
|
||||||
idump((wdata.ws_server));
|
idump((wdata.ws_server));
|
||||||
auto con = client.connect( wdata.ws_server );
|
auto con = client.connect( wdata.ws_server );
|
||||||
auto apic = std::make_shared<fc::rpc::websocket_api_connection>(con);
|
auto apic = std::make_shared<fc::rpc::websocket_api_connection>(*con, GRAPHENE_MAX_NESTED_OBJECTS);
|
||||||
|
|
||||||
auto remote_api = apic->get_remote_api< login_api >(1);
|
auto remote_api = apic->get_remote_api< login_api >(1);
|
||||||
edump((wdata.ws_user)(wdata.ws_password) );
|
edump((wdata.ws_user)(wdata.ws_password) );
|
||||||
|
|
@ -213,7 +213,7 @@ int main( int argc, char** argv )
|
||||||
_websocket_server->on_connection([&wapi]( const fc::http::websocket_connection_ptr& c ){
|
_websocket_server->on_connection([&wapi]( const fc::http::websocket_connection_ptr& c ){
|
||||||
std::cout << "here... \n";
|
std::cout << "here... \n";
|
||||||
wlog("." );
|
wlog("." );
|
||||||
auto wsc = std::make_shared<fc::rpc::websocket_api_connection>(c);
|
auto wsc = std::make_shared<fc::rpc::websocket_api_connection>(*c, GRAPHENE_MAX_NESTED_OBJECTS);
|
||||||
wsc->register_api(wapi);
|
wsc->register_api(wapi);
|
||||||
c->set_session_data( wsc );
|
c->set_session_data( wsc );
|
||||||
});
|
});
|
||||||
|
|
@ -230,7 +230,7 @@ int main( int argc, char** argv )
|
||||||
if( options.count("rpc-tls-endpoint") )
|
if( options.count("rpc-tls-endpoint") )
|
||||||
{
|
{
|
||||||
_websocket_tls_server->on_connection([&]( const fc::http::websocket_connection_ptr& c ){
|
_websocket_tls_server->on_connection([&]( const fc::http::websocket_connection_ptr& c ){
|
||||||
auto wsc = std::make_shared<fc::rpc::websocket_api_connection>(c);
|
auto wsc = std::make_shared<fc::rpc::websocket_api_connection>(*c, GRAPHENE_MAX_NESTED_OBJECTS);
|
||||||
wsc->register_api(wapi);
|
wsc->register_api(wapi);
|
||||||
c->set_session_data( wsc );
|
c->set_session_data( wsc );
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -259,7 +259,7 @@ fc::optional<fc::logging_config> load_logging_config_from_ini_file(const fc::pat
|
||||||
console_appender_config.level_colors.emplace_back(
|
console_appender_config.level_colors.emplace_back(
|
||||||
fc::console_appender::level_color(fc::log_level::error,
|
fc::console_appender::level_color(fc::log_level::error,
|
||||||
fc::console_appender::color::cyan));
|
fc::console_appender::color::cyan));
|
||||||
console_appender_config.stream = fc::variant(stream_name, 1).as<fc::console_appender::stream::type>(1);
|
console_appender_config.stream = fc::variant(stream_name, GRAPHENE_MAX_NESTED_OBJECTS).as<fc::console_appender::stream::type>(GRAPHENE_MAX_NESTED_OBJECTS);
|
||||||
logging_config.appenders.push_back(fc::appender_config(console_appender_name, "console", fc::variant(console_appender_config, GRAPHENE_MAX_NESTED_OBJECTS)));
|
logging_config.appenders.push_back(fc::appender_config(console_appender_name, "console", fc::variant(console_appender_config, GRAPHENE_MAX_NESTED_OBJECTS)));
|
||||||
found_logging_config = true;
|
found_logging_config = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
#include <graphene/witness/witness.hpp>
|
#include <graphene/witness/witness.hpp>
|
||||||
#include <graphene/account_history/account_history_plugin.hpp>
|
#include <graphene/account_history/account_history_plugin.hpp>
|
||||||
#include <graphene/accounts_list/accounts_list_plugin.hpp>
|
#include <graphene/accounts_list/accounts_list_plugin.hpp>
|
||||||
|
#include <graphene/chain/config.hpp>
|
||||||
#include <graphene/market_history/market_history_plugin.hpp>
|
#include <graphene/market_history/market_history_plugin.hpp>
|
||||||
//#include <graphene/generate_genesis/generate_genesis_plugin.hpp>
|
//#include <graphene/generate_genesis/generate_genesis_plugin.hpp>
|
||||||
//#include <graphene/generate_uia_sharedrop_genesis/generate_uia_sharedrop_genesis.hpp>
|
//#include <graphene/generate_uia_sharedrop_genesis/generate_uia_sharedrop_genesis.hpp>
|
||||||
|
|
@ -38,10 +39,14 @@
|
||||||
|
|
||||||
#include <fc/thread/thread.hpp>
|
#include <fc/thread/thread.hpp>
|
||||||
#include <fc/interprocess/signals.hpp>
|
#include <fc/interprocess/signals.hpp>
|
||||||
|
#include <fc/log/console_appender.hpp>
|
||||||
|
#include <fc/log/logger_config.hpp>
|
||||||
|
#include <fc/log/file_appender.hpp>
|
||||||
|
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
|
|
||||||
#include <boost/property_tree/ptree.hpp>
|
#include <boost/property_tree/ptree.hpp>
|
||||||
|
#include <boost/property_tree/ini_parser.hpp>
|
||||||
#include <boost/container/flat_set.hpp>
|
#include <boost/container/flat_set.hpp>
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
|
|
||||||
|
|
@ -309,4 +314,5 @@ fc::optional<fc::logging_config> load_logging_config_from_ini_file(const fc::pat
|
||||||
else
|
else
|
||||||
return fc::optional<fc::logging_config>();
|
return fc::optional<fc::logging_config>();
|
||||||
}
|
}
|
||||||
|
FC_RETHROW_EXCEPTIONS(warn, "")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#include <graphene/utilities/tempdir.hpp>
|
#include <graphene/utilities/tempdir.hpp>
|
||||||
#include <graphene/bookie/bookie_plugin.hpp>
|
#include <graphene/bookie/bookie_plugin.hpp>
|
||||||
|
#include <graphene/chain/config.hpp>
|
||||||
#include <graphene/account_history/account_history_plugin.hpp>
|
#include <graphene/account_history/account_history_plugin.hpp>
|
||||||
#include <graphene/egenesis/egenesis.hpp>
|
#include <graphene/egenesis/egenesis.hpp>
|
||||||
#include <graphene/wallet/wallet.hpp>
|
#include <graphene/wallet/wallet.hpp>
|
||||||
|
|
@ -213,7 +214,7 @@ public:
|
||||||
wallet_data.ws_password = "";
|
wallet_data.ws_password = "";
|
||||||
websocket_connection = websocket_client.connect( wallet_data.ws_server );
|
websocket_connection = websocket_client.connect( wallet_data.ws_server );
|
||||||
|
|
||||||
api_connection = std::make_shared<fc::rpc::websocket_api_connection>(websocket_connection);
|
api_connection = std::make_shared<fc::rpc::websocket_api_connection>(*websocket_connection, GRAPHENE_MAX_NESTED_OBJECTS);
|
||||||
|
|
||||||
remote_login_api = api_connection->get_remote_api< graphene::app::login_api >(1);
|
remote_login_api = api_connection->get_remote_api< graphene::app::login_api >(1);
|
||||||
BOOST_CHECK(remote_login_api->login( wallet_data.ws_user, wallet_data.ws_password ) );
|
BOOST_CHECK(remote_login_api->login( wallet_data.ws_user, wallet_data.ws_password ) );
|
||||||
|
|
@ -224,7 +225,7 @@ public:
|
||||||
|
|
||||||
wallet_api = fc::api<graphene::wallet::wallet_api>(wallet_api_ptr);
|
wallet_api = fc::api<graphene::wallet::wallet_api>(wallet_api_ptr);
|
||||||
|
|
||||||
wallet_cli = std::make_shared<fc::rpc::cli>();
|
wallet_cli = std::make_shared<fc::rpc::cli>(GRAPHENE_MAX_NESTED_OBJECTS);
|
||||||
for( auto& name_formatter : wallet_api_ptr->get_result_formatters() )
|
for( auto& name_formatter : wallet_api_ptr->get_result_formatters() )
|
||||||
wallet_cli->format_result( name_formatter.first, name_formatter.second );
|
wallet_cli->format_result( name_formatter.first, name_formatter.second );
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue