aboutsummaryrefslogtreecommitdiff
path: root/src/p2p/net_node_common.h
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-11-24 23:04:36 +0200
committerRiccardo Spagni <ric@spagni.net>2015-11-24 23:04:51 +0200
commit4061a32082554f3b18429b85b35398469b061faa (patch)
tree45c6d2da44341a4192771a1e913fda77fb91cbc0 /src/p2p/net_node_common.h
parentMerge pull request #500 (diff)
parenthardfork: fix more major/minor issues (diff)
downloadmonero-4061a32082554f3b18429b85b35398469b061faa.tar.xz
Merge pull request #501
d887c18 hardfork: fix more major/minor issues (moneromooo-monero) 3b47ca2 hardfork: fix rescan on load (moneromooo-monero) 4cea2b1 Add IP blocking for misbehaving nodes (adapted from Boolberry) (Javier Smooth) 9c64b12 quiet down p2p logging a bit (Javier Smooth) 53c75ab blockchain: log versions as numbers, not characters (moneromooo-monero) edade8d hardfork: fix actual/voting confusion (moneromooo-monero)
Diffstat (limited to 'src/p2p/net_node_common.h')
-rw-r--r--src/p2p/net_node_common.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/p2p/net_node_common.h b/src/p2p/net_node_common.h
index a7b8bf6f3..93b29deb2 100644
--- a/src/p2p/net_node_common.h
+++ b/src/p2p/net_node_common.h
@@ -50,6 +50,8 @@ namespace nodetool
virtual void request_callback(const epee::net_utils::connection_context_base& context)=0;
virtual uint64_t get_connections_count()=0;
virtual void for_each_connection(std::function<bool(t_connection_context&, peerid_type)> f)=0;
+ virtual bool block_ip(uint32_t adress)=0;
+ virtual bool add_ip_fail(uint32_t adress)=0;
};
template<class t_connection_context>
@@ -84,5 +86,13 @@ namespace nodetool
{
return false;
}
+ virtual bool block_ip(uint32_t adress)
+ {
+ return true;
+ }
+ virtual bool add_ip_fail(uint32_t adress)
+ {
+ return true;
+ }
};
}