Add IP blocking for misbehaving nodes (adapted from Boolberry)

With minor cleanup and fixes (spelling, indent) by moneromooo
This commit is contained in:
Javier Smooth 2015-11-23 17:34:55 +00:00 committed by moneromooo-monero
parent 9c64b12320
commit 4cea2b13b2
7 changed files with 108 additions and 5 deletions

View file

@ -899,9 +899,7 @@ POP_WARNINGS
boost::bind(&boosted_tcp_server<t_protocol_handler>::handle_accept, this,
boost::asio::placeholders::error));
bool r = conn->start(true, 1 < m_threads_count);
if (!r)
_erro("[sock " << conn->socket().native_handle() << "] Failed to start connection, connections_count = " << m_sock_count);
conn->start(true, 1 < m_threads_count);
conn->save_dbg_log();
}else
{