From 85be74866317481462a5cc8f0931df23b1d6672e Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Fri, 24 Jan 2014 09:14:13 -0200 Subject: [PATCH] trying to improve torrent connectivity in the long run: relax peer banning. don't preserve banned_list on startup. peers could have been banned due to changes in block chain (invalid key or height). we shouldn't keep them banned forever. somewhat related to #15. --- libtorrent/src/torrent.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libtorrent/src/torrent.cpp b/libtorrent/src/torrent.cpp index a808d00f..c8016289 100644 --- a/libtorrent/src/torrent.cpp +++ b/libtorrent/src/torrent.cpp @@ -1716,7 +1716,10 @@ namespace libtorrent { policy::peer* p = m_policy.add_peer(read_v4_endpoint(ptr) , id, peer_info::resume_data, 0); + /* [MF] relax peer banning: don't preserve on startup. peers could have been banned due to + * changes in block chain (invalid key or height). we shouldn't keep them banned forever. if (p) m_policy.ban_peer(p); + */ } } @@ -1740,7 +1743,9 @@ namespace libtorrent { policy::peer* p = m_policy.add_peer(read_v6_endpoint(ptr) , id, peer_info::resume_data, 0); + /* [MF] relax peer banning: see above if (p) m_policy.ban_peer(p); + */ } } #endif @@ -1776,7 +1781,9 @@ namespace libtorrent tcp::endpoint a(address::from_string(ip, ec), (unsigned short)port); if (ec) continue; policy::peer* p = m_policy.add_peer(a, id, peer_info::resume_data, 0); + /* [MF] relax peer banning: see above if (p) m_policy.ban_peer(p); + */ } } }