| 38 | {api::walletd::ExtCloseWallet::method(), json_rpc::make_member_method(&WalletNode::on_ext_close_wallet)}}; |
| 39 | |
| 40 | WalletNode::WalletNode(logging::ILogger &log, WalletState &wallet_state) |
| 41 | : m_log(log, "WalletNode") |
| 42 | , m_config(wallet_state.get_config()) |
| 43 | , m_currency(wallet_state.get_currency()) |
| 44 | , m_commands_agent(m_config.bytecoind_remote_ip, |
| 45 | m_config.bytecoind_remote_port ? m_config.bytecoind_remote_port : m_config.bytecoind_bind_port) { |
| 46 | if (m_config.walletd_bind_port != 0) { |
| 47 | m_api = std::make_unique<http::Server>(m_config.walletd_bind_ip, |
| 48 | m_config.walletd_bind_port, |
| 49 | std::bind(&WalletNode::on_api_http_request, this, _1, _2, _3), |
| 50 | [this](http::Client *who) { on_api_http_disconnect(who); }); |
| 51 | common::console::set_text_color(common::console::BrightGreen); |
| 52 | m_log(logging::INFO) << "Wallet RPC listening on " << m_config.walletd_bind_ip << ":" |
| 53 | << m_config.walletd_bind_port; |
| 54 | common::console::set_text_color(common::console::Default); |
| 55 | } |
| 56 | m_wallet_sync = std::make_unique<WalletSync>(log, wallet_state, std::bind(&WalletNode::advance_long_poll, this)); |
| 57 | } |
| 58 | |
| 59 | WalletNode::WalletNode(const Config &config, const Currency ¤cy, logging::ILogger &log) |
| 60 | : m_log(log, "WalletNode") |
nothing calls this directly
no test coverage detected