diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-10-26 17:59:22 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-10-26 17:59:25 +0200 |
commit | 0640cde88f63fd5e9dcac103e90ef9f6a3be7f46 (patch) | |
tree | 34a4fc210bba50ec20e5d3414220e1cea0cf1846 /src/daemon | |
parent | Merge pull request #446 (diff) | |
parent | rpc: fix hard_fork_info RPC (diff) | |
download | monero-0640cde88f63fd5e9dcac103e90ef9f6a3be7f46.tar.xz |
Merge pull request #448
06c65cb rpc: fix hard_fork_info RPC (moneromooo-monero)
6f5c129 rpc: fix a few commands not working as command line (moneromooo-monero)
Diffstat (limited to 'src/daemon')
-rw-r--r-- | src/daemon/rpc_command_executor.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp index 2ded96d81..71b2e6f9d 100644 --- a/src/daemon/rpc_command_executor.cpp +++ b/src/daemon/rpc_command_executor.cpp @@ -310,7 +310,7 @@ bool t_rpc_command_executor::print_connections() { if (m_is_rpc) { - if (!m_rpc_client->json_rpc_request(req, res, "/get_connections", fail_message.c_str())) + if (!m_rpc_client->json_rpc_request(req, res, "get_connections", fail_message.c_str())) { return true; } @@ -935,7 +935,7 @@ bool t_rpc_command_executor::out_peers(uint64_t limit) if (m_is_rpc) { - if (!m_rpc_client->json_rpc_request(req, res, "/out_peers", fail_message.c_str())) + if (!m_rpc_client->json_rpc_request(req, res, "out_peers", fail_message.c_str())) { return true; } @@ -1014,7 +1014,7 @@ bool t_rpc_command_executor::hard_fork_info(uint8_t version) if (m_is_rpc) { - if (!m_rpc_client->json_rpc_request(req, res, "/hard_fork_info", fail_message.c_str())) + if (!m_rpc_client->json_rpc_request(req, res, "hard_fork_info", fail_message.c_str())) { return true; } @@ -1026,11 +1026,13 @@ bool t_rpc_command_executor::hard_fork_info(uint8_t version) tools::fail_msg_writer() << fail_message.c_str(); return true; } - version = version > 0 ? version : res.voting; - tools::msg_writer() << "version " << (uint32_t)version << " " << (res.enabled ? "enabled" : "not enabled") << - ", " << res.votes << "/" << res.window << " votes, threshold " << res.threshold; - tools::msg_writer() << "current version " << (uint32_t)res.version << ", voting for version " << (uint32_t)res.voting; } + + version = version > 0 ? version : res.voting; + tools::msg_writer() << "version " << (uint32_t)version << " " << (res.enabled ? "enabled" : "not enabled") << + ", " << res.votes << "/" << res.window << " votes, threshold " << res.threshold; + tools::msg_writer() << "current version " << (uint32_t)res.version << ", voting for version " << (uint32_t)res.voting; + return true; } |