34 #include <boost/program_options/options_description.hpp> 35 #include <boost/program_options/variables_map.hpp> 46 #undef ELECTRONEUM_DEFAULT_LOG_CATEGORY 47 #define ELECTRONEUM_DEFAULT_LOG_CATEGORY "daemon.rpc" 82 static void init_options(boost::program_options::options_description& desc);
84 const boost::program_options::variables_map& vm,
85 const bool restricted,
259 bool check_core_busy();
260 bool check_core_ready();
265 enum invoke_http_mode { JON, BIN, JON_RPC };
266 template <
typename COMMAND_TYPE>
267 bool use_bootstrap_daemon_if_necessary(
const invoke_http_mode &mode,
const std::string &command_name,
const typename COMMAND_TYPE::request& req,
typename COMMAND_TYPE::response&
res,
bool &r);
273 boost::shared_mutex m_bootstrap_daemon_mutex;
274 bool m_should_use_bootstrap_daemon;
275 std::chrono::system_clock::time_point m_bootstrap_height_check_time;
276 bool m_was_bootstrap_ever_used;
static const command_line::arg_descriptor< std::vector< std::string > > arg_rpc_ssl_allowed_fingerprints
static const command_line::arg_descriptor< bool > arg_public_node
void init_options(boost::program_options::options_description &hidden_options, boost::program_options::options_description &normal_options)
#define MAP_URI_AUTO_JON2_IF(s_pattern, callback_f, command_type, cond)
#define MAP_JON_RPC_WE(method_name, callback_f, command_type)
epee::misc_utils::struct_init< response_t > response
int pop_blocks(cryptonote::core &core, int num_blocks)
uint64_t get_balance(const cryptonote::account_base &addr, const std::vector< cryptonote::block > &blockchain, const map_hash2tx_t &mtx)
static const command_line::arg_descriptor< std::string > arg_bootstrap_daemon_address
network_type nettype() const
static const command_line::arg_descriptor< std::string > arg_rpc_ssl_ca_certificates
#define END_JSON_RPC_MAP()
BOOST_CLASS_VERSION(nodetool::node_server< cryptonote::t_cryptonote_protocol_handler< cryptonote::core > >, 1)
static const command_line::arg_descriptor< std::string > arg_bootstrap_daemon_login
Holds cryptonote related classes and helpers.
#define MAP_JON_RPC_WE_IF(method_name, callback_f, command_type, cond)
static const command_line::arg_descriptor< std::string > arg_rpc_ssl_certificate
static const command_line::arg_descriptor< std::string > arg_rpc_restricted_bind_port
static const command_line::arg_descriptor< std::string > arg_rpc_ssl
#define MAP_JON_RPC(method_name, callback_f, command_type)
handles core cryptonote functionality
unsigned __int64 uint64_t
static const command_line::arg_descriptor< std::string > arg_rpc_ssl_private_key
#define BEGIN_JSON_RPC_MAP(uri)
#define MAP_URI_AUTO_BIN2(s_pattern, callback_f, command_type)
This is the orginal cryptonote protocol network-events handler, modified by us.
#define CHAIN_HTTP_TO_MAP2(context_type)
boost::endian::big_uint16_t port
epee::net_utils::connection_context_base connection_context
static const command_line::arg_descriptor< bool > arg_rpc_ssl_allow_any_cert
#define MAP_URI_AUTO_JON2(s_pattern, callback_f, command_type)
bool get_output_distribution(uint64_t amount, uint64_t from, uint64_t to, uint64_t &start_height, std::vector< uint64_t > &distribution, uint64_t &base)
static const command_line::arg_descriptor< std::string, false, true, 2 > arg_rpc_bind_port
bool get_block_reward(size_t median_weight, size_t current_block_weight, uint64_t already_generated_coins, uint64_t &reward, uint8_t version, uint64_t current_block_height, network_type nettype)
std::string sign_message(const std::string &message, const std::string &privateKey)
static const command_line::arg_descriptor< bool > arg_restricted_rpc
error
Tracks LMDB error codes.