MCPcopy Create free account
hub / github.com/bcndev/bytecoin / WalletNode

Method WalletNode

src/Core/WalletNode.cpp:40–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 {api::walletd::ExtCloseWallet::method(), json_rpc::make_member_method(&WalletNode::on_ext_close_wallet)}};
39
40WalletNode::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
59WalletNode::WalletNode(const Config &config, const Currency &currency, logging::ILogger &log)
60 : m_log(log, "WalletNode")

Callers

nothing calls this directly

Calls 1

set_text_colorFunction · 0.85

Tested by

no test coverage detected