aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_node.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-26 00:04:22 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-26 00:04:22 +0000
commit38ceb73848a3c37df60bce637d855b7564b09730 (patch)
treeed35b91ab9e9b6a90e612cfe1ad42d54ce1d5321 /src/p2p/net_node.h
parentnet_node: allow bans for custom amounts of time (diff)
downloadmonero-38ceb73848a3c37df60bce637d855b7564b09730.tar.xz
add RPC calls and commands to get/set bans
Diffstat (limited to 'src/p2p/net_node.h')
-rw-r--r--src/p2p/net_node.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h
index 74599f180..39cbe01fa 100644
--- a/src/p2p/net_node.h
+++ b/src/p2p/net_node.h
@@ -117,6 +117,9 @@ namespace nodetool
size_t get_outgoing_connections_count();
peerlist_manager& get_peerlist_manager(){return m_peerlist;}
void delete_connections(size_t count);
+ virtual bool block_ip(uint32_t adress, time_t seconds = P2P_IP_BLOCKTIME);
+ virtual bool unblock_ip(uint32_t address);
+ virtual std::map<uint32_t, time_t> get_blocked_ips() const { return m_blocked_ips; }
private:
const std::vector<std::string> m_seed_nodes_list =
{ "seeds.moneroseeds.se"
@@ -171,7 +174,6 @@ namespace nodetool
virtual bool drop_connection(const epee::net_utils::connection_context_base& context);
virtual void request_callback(const epee::net_utils::connection_context_base& context);
virtual void for_each_connection(std::function<bool(typename t_payload_net_handler::connection_context&, peerid_type)> f);
- virtual bool block_ip(uint32_t adress, uint32_t seconds = P2P_IP_BLOCKTIME);
virtual bool add_ip_fail(uint32_t address);
//----------------- i_connection_filter --------------------------------------------------------
virtual bool is_remote_ip_allowed(uint32_t adress);