Monero
command_parser_executor.h
Go to the documentation of this file.
1 
9 // Copyright (c) 2014-2020, The Monero Project
10 //
11 // All rights reserved.
12 //
13 // Redistribution and use in source and binary forms, with or without modification, are
14 // permitted provided that the following conditions are met:
15 //
16 // 1. Redistributions of source code must retain the above copyright notice, this list of
17 // conditions and the following disclaimer.
18 //
19 // 2. Redistributions in binary form must reproduce the above copyright notice, this list
20 // of conditions and the following disclaimer in the documentation and/or other
21 // materials provided with the distribution.
22 //
23 // 3. Neither the name of the copyright holder nor the names of its contributors may be
24 // used to endorse or promote products derived from this software without specific
25 // prior written permission.
26 //
27 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
28 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
29 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
30 // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
34 // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
35 // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 
37 #pragma once
38 
39 #include <boost/optional/optional.hpp>
40 
42 #include "common/common_fwd.h"
43 #include "net/net_fwd.h"
44 #include "rpc/core_rpc_server.h"
45 
46 namespace daemonize {
47 
49 {
50 private:
52 public:
54  uint32_t ip
55  , uint16_t port
56  , const boost::optional<tools::login>& login
57  , const epee::net_utils::ssl_options_t& ssl_options
58  , bool is_rpc
59  , cryptonote::core_rpc_server* rpc_server = NULL
60  );
61 
62  bool print_peer_list(const std::vector<std::string>& args);
63 
64  bool print_peer_list_stats(const std::vector<std::string>& args);
65 
66  bool save_blockchain(const std::vector<std::string>& args);
67 
68  bool show_hash_rate(const std::vector<std::string>& args);
69 
70  bool hide_hash_rate(const std::vector<std::string>& args);
71 
72  bool show_difficulty(const std::vector<std::string>& args);
73 
74  bool show_status(const std::vector<std::string>& args);
75 
76  bool print_connections(const std::vector<std::string>& args);
77 
78  bool print_blockchain_info(const std::vector<std::string>& args);
79 
80  bool set_log_level(const std::vector<std::string>& args);
81 
82  bool set_log_categories(const std::vector<std::string>& args);
83 
84  bool print_height(const std::vector<std::string>& args);
85 
86  bool print_block(const std::vector<std::string>& args);
87 
88  bool print_transaction(const std::vector<std::string>& args);
89 
90  bool is_key_image_spent(const std::vector<std::string>& args);
91 
92  bool print_transaction_pool_long(const std::vector<std::string>& args);
93 
94  bool print_transaction_pool_short(const std::vector<std::string>& args);
95 
96  bool print_transaction_pool_stats(const std::vector<std::string>& args);
97 
98  bool start_mining(const std::vector<std::string>& args);
99 
100  bool stop_mining(const std::vector<std::string>& args);
101 
102  bool mining_status(const std::vector<std::string>& args);
103 
104  bool stop_daemon(const std::vector<std::string>& args);
105 
106  bool print_status(const std::vector<std::string>& args);
107 
108  bool set_limit(const std::vector<std::string>& args);
109 
110  bool set_limit_up(const std::vector<std::string>& args);
111 
112  bool set_limit_down(const std::vector<std::string>& args);
113 
114  bool out_peers(const std::vector<std::string>& args);
115 
116  bool in_peers(const std::vector<std::string>& args);
117 
118  bool hard_fork_info(const std::vector<std::string>& args);
119 
120  bool show_bans(const std::vector<std::string>& args);
121 
122  bool ban(const std::vector<std::string>& args);
123 
124  bool unban(const std::vector<std::string>& args);
125 
126  bool banned(const std::vector<std::string>& args);
127 
128  bool flush_txpool(const std::vector<std::string>& args);
129 
130  bool output_histogram(const std::vector<std::string>& args);
131 
132  bool print_coinbase_tx_sum(const std::vector<std::string>& args);
133 
134  bool alt_chain_info(const std::vector<std::string>& args);
135 
136  bool print_blockchain_dynamic_stats(const std::vector<std::string>& args);
137 
138  bool update(const std::vector<std::string>& args);
139 
140  bool relay_tx(const std::vector<std::string>& args);
141 
142  bool sync_info(const std::vector<std::string>& args);
143 
144  bool pop_blocks(const std::vector<std::string>& args);
145 
146  bool rpc_payments(const std::vector<std::string>& args);
147 
148  bool version(const std::vector<std::string>& args);
149 
150  bool prune_blockchain(const std::vector<std::string>& args);
151 
152  bool check_blockchain_pruning(const std::vector<std::string>& args);
153 
154  bool print_net_stats(const std::vector<std::string>& args);
155 
156  bool set_bootstrap_daemon(const std::vector<std::string>& args);
157 
158  bool flush_cache(const std::vector<std::string>& args);
159 };
160 
161 } // namespace daemonize
core_rpc_server.h
daemonize::t_command_parser_executor::print_height
bool print_height(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:209
daemonize::t_command_parser_executor::show_status
bool show_status(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:126
daemonize::t_command_parser_executor::sync_info
bool sync_info(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:777
daemonize::t_command_parser_executor::set_bootstrap_daemon
bool set_bootstrap_daemon(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:844
daemonize::t_command_parser_executor::flush_txpool
bool flush_txpool(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:622
daemonize::t_command_parser_executor::print_block
bool print_block(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:216
daemonize::t_command_parser_executor::t_command_parser_executor
t_command_parser_executor(uint32_t ip, uint16_t port, const boost::optional< tools::login > &login, const epee::net_utils::ssl_options_t &ssl_options, bool is_rpc, cryptonote::core_rpc_server *rpc_server=NULL)
Definition: command_parser_executor.cpp:38
daemonize::t_rpc_command_executor
Definition: rpc_command_executor.h:54
daemonize::t_command_parser_executor::show_bans
bool show_bans(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:579
daemonize::t_command_parser_executor::print_connections
bool print_connections(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:133
daemonize::t_command_parser_executor::print_transaction
bool print_transaction(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:254
daemonize::t_command_parser_executor::hide_hash_rate
bool hide_hash_rate(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:112
daemonize::t_command_parser_executor::stop_daemon
bool stop_daemon(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:449
daemonize::t_command_parser_executor::print_transaction_pool_short
bool print_transaction_pool_short(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:317
daemonize::t_command_parser_executor::print_transaction_pool_long
bool print_transaction_pool_long(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:310
rpc_command_executor.h
daemonize::t_command_parser_executor::version
bool version(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:816
daemonize::t_command_parser_executor::unban
bool unban(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:608
daemonize::t_command_parser_executor::print_transaction_pool_stats
bool print_transaction_pool_stats(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:324
daemonize::t_command_parser_executor::stop_mining
bool stop_mining(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:437
daemonize::t_command_parser_executor::print_status
bool print_status(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:456
daemonize::t_command_parser_executor::rpc_payments
bool rpc_payments(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:809
daemonize::t_command_parser_executor::print_coinbase_tx_sum
bool print_coinbase_tx_sum(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:672
daemonize::t_command_parser_executor::relay_tx
bool relay_tx(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:762
daemonize::t_command_parser_executor::set_log_level
bool set_log_level(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:180
daemonize::t_command_parser_executor::set_limit_up
bool set_limit_up(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:481
daemonize::t_command_parser_executor::set_log_categories
bool set_log_categories(const std::vector< std::string > &args)
build_protob.args
args
Definition: build_protob.py:10
common_fwd.h
daemonize::t_command_parser_executor::print_peer_list_stats
bool print_peer_list_stats(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:91
daemonize::t_command_parser_executor::print_net_stats
bool print_net_stats(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:140
cryptonote::core_rpc_server
Definition: core_rpc_server.h:60
daemonize::t_command_parser_executor::set_limit_down
bool set_limit_down(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:499
daemonize::t_command_parser_executor::show_difficulty
bool show_difficulty(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:119
daemonize::t_command_parser_executor::hard_fork_info
bool hard_fork_info(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:557
daemonize::t_command_parser_executor::print_blockchain_info
bool print_blockchain_info(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:147
daemonize::t_command_parser_executor::alt_chain_info
bool alt_chain_info(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:695
daemonize::t_command_parser_executor::output_histogram
bool output_histogram(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:640
daemonize::t_command_parser_executor::in_peers
bool in_peers(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:537
daemonize::t_command_parser_executor::ban
bool ban(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:585
daemonize::t_command_parser_executor::show_hash_rate
bool show_hash_rate(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:105
daemonize::t_command_parser_executor::check_blockchain_pruning
bool check_blockchain_pruning(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:839
daemonize::t_command_parser_executor::mining_status
bool mining_status(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:444
daemonize
Definition: command_parser_executor.cpp:36
daemonize::t_command_parser_executor::print_blockchain_dynamic_stats
bool print_blockchain_dynamic_stats(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:733
daemonize::t_command_parser_executor::banned
bool banned(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:615
daemonize::t_command_parser_executor::is_key_image_spent
bool is_key_image_spent(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:290
daemonize::t_command_parser_executor::update
bool update(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:751
daemonize::t_command_parser_executor::set_limit
bool set_limit(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:463
daemonize::t_command_parser_executor::print_peer_list
bool print_peer_list(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:49
daemonize::t_command_parser_executor
Definition: command_parser_executor.h:49
daemonize::t_command_parser_executor::pop_blocks
bool pop_blocks(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:784
daemonize::t_command_parser_executor::save_blockchain
bool save_blockchain(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:98
daemonize::t_command_parser_executor::out_peers
bool out_peers(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:517
daemonize::t_command_parser_executor::start_mining
bool start_mining(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:331
daemonize::t_command_parser_executor::prune_blockchain
bool prune_blockchain(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:821
daemonize::t_command_parser_executor::m_executor
t_rpc_command_executor m_executor
Definition: command_parser_executor.h:51
daemonize::t_command_parser_executor::flush_cache
bool flush_cache(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:858