34 #include <boost/program_options/options_description.hpp>
35 #include <boost/program_options/variables_map.hpp>
44 #undef ELECTRONEUM_DEFAULT_LOG_CATEGORY
45 #define ELECTRONEUM_DEFAULT_LOG_CATEGORY "daemon.rpc"
80 static void init_options(boost::program_options::options_description& desc);
82 const boost::program_options::variables_map& vm,
83 const bool restricted,
251 bool check_core_busy();
252 bool check_core_ready();
257 enum invoke_http_mode { JON, BIN, JON_RPC };
258 template <
typename COMMAND_TYPE>
259 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);
265 boost::shared_mutex m_bootstrap_daemon_mutex;
266 bool m_should_use_bootstrap_daemon;
267 std::chrono::system_clock::time_point m_bootstrap_height_check_time;
268 bool m_was_bootstrap_ever_used;
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< bool > arg_rpc_ssl_allow_any_cert
static const command_line::arg_descriptor< std::string > arg_rpc_ssl_ca_certificates
static const command_line::arg_descriptor< std::string > arg_rpc_ssl_private_key
epee::net_utils::connection_context_base connection_context
static const command_line::arg_descriptor< std::string > arg_rpc_ssl_certificate
CHAIN_HTTP_TO_MAP2(connection_context)
static const command_line::arg_descriptor< bool > arg_public_node
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
static const command_line::arg_descriptor< std::string > arg_bootstrap_daemon_login
static const command_line::arg_descriptor< std::string, false, true, 2 > arg_rpc_bind_port
static const command_line::arg_descriptor< std::vector< std::string > > arg_rpc_ssl_allowed_fingerprints
static const command_line::arg_descriptor< std::string > arg_rpc_restricted_bind_port
static const command_line::arg_descriptor< bool > arg_restricted_rpc
handles core cryptonote functionality
BOOST_CLASS_VERSION(nodetool::node_server< cryptonote::t_cryptonote_protocol_handler< cryptonote::core > >, 1)
This is the orginal cryptonote protocol network-events handler, modified by us.
#define MAP_JON_RPC(method_name, callback_f, command_type)
#define END_JSON_RPC_MAP()
#define MAP_URI_AUTO_JON2(s_pattern, callback_f, command_type)
#define MAP_URI_AUTO_BIN2(s_pattern, callback_f, command_type)
#define MAP_JON_RPC_WE_IF(method_name, callback_f, command_type, cond)
#define MAP_JON_RPC_WE(method_name, callback_f, command_type)
#define MAP_URI_AUTO_JON2_IF(s_pattern, callback_f, command_type, cond)
#define BEGIN_JSON_RPC_MAP(uri)
std::string sign_message(const std::string &message, const std::string &privateKey)
Holds cryptonote related classes and helpers.
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)
void init_options(boost::program_options::options_description &hidden_options, boost::program_options::options_description &normal_options)
epee::misc_utils::struct_init< response_t > response
error
Tracks LMDB error codes.
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)
boost::endian::big_uint16_t port
unsigned __int64 uint64_t