aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_node.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-25 22:04:27 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-25 22:23:04 +0000
commit7bc4dce6ede055be5f6d494766eb31b9e68ae8a1 (patch)
treeb0e0f292620991498dc20fd186784f78badb87cb /src/p2p/net_node.h
parentMerge pull request #501 (diff)
downloadmonero-7bc4dce6ede055be5f6d494766eb31b9e68ae8a1.tar.xz
net_node: allow bans for custom amounts of time
m_blocked_ips now stores the unblocking time, rather than the blocking time. Also change > to >=, since banning for 0 seconds should not ban
Diffstat (limited to 'src/p2p/net_node.h')
-rw-r--r--src/p2p/net_node.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/p2p/net_node.h b/src/p2p/net_node.h
index 4aaac813e..74599f180 100644
--- a/src/p2p/net_node.h
+++ b/src/p2p/net_node.h
@@ -171,7 +171,7 @@ 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);
+ 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);