diff options
Diffstat (limited to 'src/p2p/net_node.inl')
-rw-r--r-- | src/p2p/net_node.inl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl index bb77ea658..191efd297 100644 --- a/src/p2p/net_node.inl +++ b/src/p2p/net_node.inl @@ -315,13 +315,13 @@ namespace nodetool } //----------------------------------------------------------------------------------- template<class t_payload_net_handler> - bool node_server<t_payload_net_handler>::add_host_fail(const epee::net_utils::network_address &address) + bool node_server<t_payload_net_handler>::add_host_fail(const epee::net_utils::network_address &address, unsigned int score) { if(!address.is_blockable()) return false; CRITICAL_REGION_LOCAL(m_host_fails_score_lock); - uint64_t fails = ++m_host_fails_score[address.host_str()]; + uint64_t fails = m_host_fails_score[address.host_str()] += score; MDEBUG("Host " << address.host_str() << " fail score=" << fails); if(fails > P2P_IP_FAILS_BEFORE_BLOCK) { |