aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-06-25 16:50:08 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-10-25 09:34:41 +0000
commitffa46026b5360decf5343b85fb267d026f41e760 (patch)
tree63a4c924fb9346c5b9859ac0236c778d3344e7b8 /src/rpc
parentdaemon, wallet: new pay for RPC use system (diff)
downloadmonero-ffa46026b5360decf5343b85fb267d026f41e760.tar.xz
simplewallet: add public_nodes command
Lists nodes exposing their RPC port for public use
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/core_rpc_server.h2
-rw-r--r--src/rpc/core_rpc_server_commands_defs.h6
-rw-r--r--src/rpc/rpc_payment_costs.h1
3 files changed, 6 insertions, 3 deletions
diff --git a/src/rpc/core_rpc_server.h b/src/rpc/core_rpc_server.h
index 1f12815b3..6655d621e 100644
--- a/src/rpc/core_rpc_server.h
+++ b/src/rpc/core_rpc_server.h
@@ -116,7 +116,7 @@ namespace cryptonote
MAP_URI_AUTO_JON2_IF("/mining_status", on_mining_status, COMMAND_RPC_MINING_STATUS, !m_restricted)
MAP_URI_AUTO_JON2_IF("/save_bc", on_save_bc, COMMAND_RPC_SAVE_BC, !m_restricted)
MAP_URI_AUTO_JON2_IF("/get_peer_list", on_get_peer_list, COMMAND_RPC_GET_PEER_LIST, !m_restricted)
- MAP_URI_AUTO_JON2_IF("/get_public_nodes", on_get_public_nodes, COMMAND_RPC_GET_PUBLIC_NODES, !m_restricted)
+ MAP_URI_AUTO_JON2("/get_public_nodes", on_get_public_nodes, COMMAND_RPC_GET_PUBLIC_NODES)
MAP_URI_AUTO_JON2_IF("/set_log_hash_rate", on_set_log_hash_rate, COMMAND_RPC_SET_LOG_HASH_RATE, !m_restricted)
MAP_URI_AUTO_JON2_IF("/set_log_level", on_set_log_level, COMMAND_RPC_SET_LOG_LEVEL, !m_restricted)
MAP_URI_AUTO_JON2_IF("/set_log_categories", on_set_log_categories, COMMAND_RPC_SET_LOG_CATEGORIES, !m_restricted)
diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h
index 1f8286951..89c88a835 100644
--- a/src/rpc/core_rpc_server_commands_defs.h
+++ b/src/rpc/core_rpc_server_commands_defs.h
@@ -1216,17 +1216,19 @@ namespace cryptonote
std::string host;
uint64_t last_seen;
uint16_t rpc_port;
+ uint32_t rpc_credits_per_hash;
- public_node() = delete;
+ public_node(): last_seen(0), rpc_port(0), rpc_credits_per_hash(0) {}
public_node(const peer &peer)
- : host(peer.host), last_seen(peer.last_seen), rpc_port(peer.rpc_port)
+ : host(peer.host), last_seen(peer.last_seen), rpc_port(peer.rpc_port), rpc_credits_per_hash(peer.rpc_credits_per_hash)
{}
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE(host)
KV_SERIALIZE(last_seen)
KV_SERIALIZE(rpc_port)
+ KV_SERIALIZE(rpc_credits_per_hash)
END_KV_SERIALIZE_MAP()
};
diff --git a/src/rpc/rpc_payment_costs.h b/src/rpc/rpc_payment_costs.h
index 066557f42..3b27bf286 100644
--- a/src/rpc/rpc_payment_costs.h
+++ b/src/rpc/rpc_payment_costs.h
@@ -47,3 +47,4 @@
#define COST_PER_FEE_ESTIMATE 1
#define COST_PER_SYNC_INFO 2
#define COST_PER_HARD_FORK_INFO 1
+#define COST_PER_PEER_LIST 2