Monero
command_parser_executor.h
Go to the documentation of this file.
1 
9 // Copyright (c) 2014-2022, 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 "rpc/core_rpc_server.h"
44 
45 namespace daemonize {
46 
48 {
49 private:
51 public:
53  uint32_t ip
54  , uint16_t port
55  , const boost::optional<tools::login>& login
56  , const epee::net_utils::ssl_options_t& ssl_options
57  , bool is_rpc
58  , cryptonote::core_rpc_server* rpc_server = NULL
59  );
60 
61  bool print_peer_list(const std::vector<std::string>& args);
62 
63  bool print_peer_list_stats(const std::vector<std::string>& args);
64 
65  bool save_blockchain(const std::vector<std::string>& args);
66 
67  bool show_hash_rate(const std::vector<std::string>& args);
68 
69  bool hide_hash_rate(const std::vector<std::string>& args);
70 
71  bool show_difficulty(const std::vector<std::string>& args);
72 
73  bool show_status(const std::vector<std::string>& args);
74 
75  bool print_connections(const std::vector<std::string>& args);
76 
77  bool print_blockchain_info(const std::vector<std::string>& args);
78 
79  bool set_log_level(const std::vector<std::string>& args);
80 
81  bool set_log_categories(const std::vector<std::string>& args);
82 
83  bool print_height(const std::vector<std::string>& args);
84 
85  bool print_block(const std::vector<std::string>& args);
86 
87  bool print_transaction(const std::vector<std::string>& args);
88 
89  bool is_key_image_spent(const std::vector<std::string>& args);
90 
91  bool print_transaction_pool_long(const std::vector<std::string>& args);
92 
93  bool print_transaction_pool_short(const std::vector<std::string>& args);
94 
95  bool print_transaction_pool_stats(const std::vector<std::string>& args);
96 
97  bool start_mining(const std::vector<std::string>& args);
98 
99  bool stop_mining(const std::vector<std::string>& args);
100 
101  bool mining_status(const std::vector<std::string>& args);
102 
103  bool stop_daemon(const std::vector<std::string>& args);
104 
105  bool print_status(const std::vector<std::string>& args);
106 
107  bool set_limit(const std::vector<std::string>& args);
108 
109  bool set_limit_up(const std::vector<std::string>& args);
110 
111  bool set_limit_down(const std::vector<std::string>& args);
112 
113  bool out_peers(const std::vector<std::string>& args);
114 
115  bool in_peers(const std::vector<std::string>& args);
116 
117  bool hard_fork_info(const std::vector<std::string>& args);
118 
119  bool show_bans(const std::vector<std::string>& args);
120 
121  bool ban(const std::vector<std::string>& args);
122 
123  bool unban(const std::vector<std::string>& args);
124 
125  bool banned(const std::vector<std::string>& args);
126 
127  bool flush_txpool(const std::vector<std::string>& args);
128 
129  bool output_histogram(const std::vector<std::string>& args);
130 
131  bool print_coinbase_tx_sum(const std::vector<std::string>& args);
132 
133  bool alt_chain_info(const std::vector<std::string>& args);
134 
135  bool print_blockchain_dynamic_stats(const std::vector<std::string>& args);
136 
137  bool update(const std::vector<std::string>& args);
138 
139  bool relay_tx(const std::vector<std::string>& args);
140 
141  bool sync_info(const std::vector<std::string>& args);
142 
143  bool pop_blocks(const std::vector<std::string>& args);
144 
145  bool rpc_payments(const std::vector<std::string>& args);
146 
147  bool version(const std::vector<std::string>& args);
148 
149  bool prune_blockchain(const std::vector<std::string>& args);
150 
151  bool check_blockchain_pruning(const std::vector<std::string>& args);
152 
153  bool print_net_stats(const std::vector<std::string>& args);
154 
155  bool set_bootstrap_daemon(const std::vector<std::string>& args);
156 
157  bool flush_cache(const std::vector<std::string>& args);
158 };
159 
160 } // namespace daemonize
bool set_bootstrap_daemon(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:999
bool start_mining(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:369
Definition: net_ssl.h:76
t_rpc_command_executor m_executor
Definition: command_parser_executor.h:50
bool show_status(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:143
bool print_transaction_pool_long(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:339
bool show_bans(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:647
bool flush_txpool(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:759
bool print_connections(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:153
bool hide_hash_rate(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:123
bool print_transaction_pool_stats(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:359
bool print_transaction_pool_short(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:349
bool flush_cache(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:1064
Definition: command_parser_executor.cpp:39
bool unban(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:738
bool print_block(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:245
unsigned short uint16_t
Definition: stdint.h:125
bool set_limit_up(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:535
bool print_transaction(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:283
args
Definition: build_protob.py:10
bool print_net_stats(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:163
bool stop_daemon(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:493
bool stop_mining(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:478
bool version(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:967
bool set_log_categories(const std::vector< std::string > &args)
bool rpc_payments(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:957
bool hard_fork_info(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:621
Definition: command_parser_executor.h:47
bool relay_tx(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:903
unsigned int uint32_t
Definition: stdint.h:126
bool ban(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:657
bool print_coinbase_tx_sum(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:812
bool print_status(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:503
bool output_histogram(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:780
bool set_log_level(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:206
bool print_peer_list_stats(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:94
bool set_limit_down(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:557
boost::endian::big_uint32_t ip
Definition: socks.cpp:62
boost::endian::big_uint16_t port
Definition: socks.cpp:61
Definition: rpc_command_executor.h:53
bool show_difficulty(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:133
bool update(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:892
bool alt_chain_info(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:836
bool print_blockchain_info(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:173
bool in_peers(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:600
bool show_hash_rate(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:113
bool banned(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:749
bool pop_blocks(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:932
bool print_peer_list(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:52
Definition: core_rpc_server.h:55
bool check_blockchain_pruning(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:994
bool prune_blockchain(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:972
bool set_limit(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:513
bool mining_status(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:488
bool sync_info(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:922
bool print_blockchain_dynamic_stats(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:874
bool out_peers(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:579
bool is_key_image_spent(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:319
bool save_blockchain(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:104
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:41
bool print_height(const std::vector< std::string > &args)
Definition: command_parser_executor.cpp:235