diff options
Diffstat (limited to 'src/daemon')
-rw-r--r-- | src/daemon/command_parser_executor.cpp | 6 | ||||
-rw-r--r-- | src/daemon/core.h | 1 | ||||
-rw-r--r-- | src/daemon/daemon.cpp | 3 | ||||
-rw-r--r-- | src/daemon/executor.cpp | 1 | ||||
-rw-r--r-- | src/daemon/protocol.h | 2 | ||||
-rw-r--r-- | src/daemon/rpc_command_executor.cpp | 4 |
6 files changed, 7 insertions, 10 deletions
diff --git a/src/daemon/command_parser_executor.cpp b/src/daemon/command_parser_executor.cpp index 5307b2472..8970f9407 100644 --- a/src/daemon/command_parser_executor.cpp +++ b/src/daemon/command_parser_executor.cpp @@ -173,7 +173,7 @@ bool t_command_parser_executor::print_block(const std::vector<std::string>& args uint64_t height = boost::lexical_cast<uint64_t>(arg); return m_executor.print_block_by_height(height); } - catch (boost::bad_lexical_cast&) + catch (const boost::bad_lexical_cast&) { crypto::hash block_hash; if (parse_hash256(arg, block_hash)) @@ -420,7 +420,7 @@ bool t_command_parser_executor::out_peers(const std::vector<std::string>& args) limit = std::stoi(args[0]); } - catch(std::exception& ex) { + catch(const std::exception& ex) { _erro("stoi exception"); return false; } @@ -450,7 +450,7 @@ bool t_command_parser_executor::hard_fork_info(const std::vector<std::string>& a try { version = std::stoi(args[0]); } - catch(std::exception& ex) { + catch(const std::exception& ex) { return false; } if (version <= 0 || version > 255) diff --git a/src/daemon/core.h b/src/daemon/core.h index 97f1cb8c1..bf4f9bb3d 100644 --- a/src/daemon/core.h +++ b/src/daemon/core.h @@ -31,7 +31,6 @@ #include "cryptonote_core/cryptonote_core.h" #include "cryptonote_protocol/cryptonote_protocol_handler.h" #include "misc_log_ex.h" -#include "daemon/command_line_args.h" #undef MONERO_DEFAULT_LOG_CATEGORY #define MONERO_DEFAULT_LOG_CATEGORY "daemon" diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index 3bc6ea392..55d868a3c 100644 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -43,8 +43,9 @@ #include "daemon/protocol.h" #include "daemon/rpc.h" #include "daemon/command_server.h" +#include "daemon/command_server.h" +#include "daemon/command_line_args.h" #include "version.h" -#include "syncobj.h" using namespace epee; diff --git a/src/daemon/executor.cpp b/src/daemon/executor.cpp index 6130bfa28..3379eeca4 100644 --- a/src/daemon/executor.cpp +++ b/src/daemon/executor.cpp @@ -30,7 +30,6 @@ #include "daemon/executor.h" -#include "common/command_line.h" #include "cryptonote_config.h" #include "version.h" diff --git a/src/daemon/protocol.h b/src/daemon/protocol.h index fc5edbcaa..01de535d5 100644 --- a/src/daemon/protocol.h +++ b/src/daemon/protocol.h @@ -33,8 +33,6 @@ #undef MONERO_DEFAULT_LOG_CATEGORY #define MONERO_DEFAULT_LOG_CATEGORY "daemon" -#include "common/scoped_message_writer.h" - namespace daemonize { diff --git a/src/daemon/rpc_command_executor.cpp b/src/daemon/rpc_command_executor.cpp index d7ee28baa..2e2411708 100644 --- a/src/daemon/rpc_command_executor.cpp +++ b/src/daemon/rpc_command_executor.cpp @@ -538,7 +538,7 @@ bool t_rpc_command_executor::print_blockchain_info(uint64_t start_block_index, u std::cout << std::endl; std::cout << "height: " << header.height << ", timestamp: " << header.timestamp << ", difficulty: " << header.difficulty - << ", size: " << header.block_size << std::endl + << ", size: " << header.block_size << ", transactions: " << header.num_txes << std::endl << "major version: " << (unsigned)header.major_version << ", minor version: " << (unsigned)header.minor_version << std::endl << "block id: " << header.hash << ", previous block id: " << header.prev_hash << std::endl << "difficulty: " << header.difficulty << ", nonce " << header.nonce << ", reward " << cryptonote::print_money(header.reward) << std::endl; @@ -1611,7 +1611,7 @@ bool t_rpc_command_executor::alt_chain_info() } tools::msg_writer() << boost::lexical_cast<std::string>(res.chains.size()) << " alternate chains found:"; - for (const auto chain: res.chains) + for (const auto &chain: res.chains) { uint64_t start_height = (chain.height - chain.length + 1); tools::msg_writer() << chain.length << " blocks long, from height " << start_height << " (" << (ires.height - start_height - 1) |