1
0
Fork 0
forked from lthn/blockchain

added command to enable service

This commit is contained in:
cryptozoidberg 2019-08-28 22:52:07 +02:00
parent 3679c7e638
commit e8ad37cc8b
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC
4 changed files with 11 additions and 3 deletions

View file

@ -29,4 +29,5 @@ namespace command_line
const arg_descriptor<bool> arg_disable_stop_if_time_out_of_sync = { "disable-stop-if-time-out-of-sync", "Do not stop the daemon if serious time synchronization problem is detected", false, true };
const arg_descriptor<bool> arg_disable_stop_on_low_free_space = { "disable-stop-on-low-free-space", "Do not stop the daemon if free space at data dir is critically low", false, true };
const arg_descriptor<bool> arg_enable_offers_service = { "enable_offers_service", "Enables marketplace feature", false, false};
}

View file

@ -187,4 +187,5 @@ namespace command_line
extern const arg_descriptor<bool> arg_disable_upnp;
extern const arg_descriptor<bool> arg_disable_stop_if_time_out_of_sync;
extern const arg_descriptor<bool> arg_disable_stop_on_low_free_space;
extern const arg_descriptor<bool> arg_enable_offers_service;
}

View file

@ -126,6 +126,7 @@ int main(int argc, char* argv[])
command_line::add_arg(desc_cmd_sett, command_line::arg_show_rpc_autodoc);
command_line::add_arg(desc_cmd_sett, command_line::arg_disable_stop_if_time_out_of_sync);
command_line::add_arg(desc_cmd_sett, command_line::arg_disable_stop_on_low_free_space);
command_line::add_arg(desc_cmd_sett, command_line::arg_enable_offers_service);
arg_market_disable.default_value = true;
@ -219,8 +220,14 @@ int main(int argc, char* argv[])
command_line::get_arg(vm, command_line::arg_disable_stop_on_low_free_space));
ccore.set_critical_error_handler(&cceh);
//ccore.get_blockchain_storage().get_attachment_services_manager().add_service(&offers_service);
std::shared_ptr<currency::stratum_server> stratum_server_ptr;
if (command_line::get_arg(vm, command_line::arg_enable_offers_service))
{
ccore.get_blockchain_storage().get_attachment_services_manager().add_service(&offers_service);
}
std::shared_ptr<currency::stratum_server> stratum_server_ptr;
if (stratum_enabled)
stratum_server_ptr = std::make_shared<currency::stratum_server>(&ccore);

View file

@ -94,7 +94,6 @@ public:
std::string request_cancel_contract(size_t wallet_id, const crypto::hash& contract_id, uint64_t fee, uint64_t expiration_period);
std::string accept_cancel_contract(size_t wallet_id, const crypto::hash& contract_id);
std::string get_wallet_info(wallet_vs_options& w, view::wallet_info& wi);
std::string close_wallet(size_t wallet_id);
std::string push_offer(size_t wallet_id, const bc_services::offer_details_ex& od, currency::transaction& res_tx);