Browse Source

Until old public key is properly used, disable banning torrent peers due to bad piece hashes.

+note: torrent.cpp line 3286 (function piece_failed), iteration to ban peers is disabled (continue)
miguelfreitas
Miguel Freitas 11 years ago
parent
commit
c0ec1f4afe
  1. 5
      TODO
  2. 5
      libtorrent/src/torrent.cpp

5
TODO

@ -8,6 +8,9 @@ pseudocode:
while( h > max_h ) while( h > max_h )
getTxIndex( "userX_h" ) => block h contains the previous tx getTxIndex( "userX_h" ) => block h contains the previous tx
- Until old public key is properly used, disable banning torrent peers due to bad piece hashes.
note: torrent.cpp line 3286 (function piece_failed), iteration to ban peers is disabled (continue).
- Count UTF8 chars in acceptSignedPost to proper limit the 140 characters. - Count UTF8 chars in acceptSignedPost to proper limit the 140 characters.
- Encrypt user_data (which contains all DMs) - Encrypt user_data (which contains all DMs)
@ -52,5 +55,7 @@ policy may me defined.
- Check stored dht values if their signature is still valid before trying to refresh another node. - Check stored dht values if their signature is still valid before trying to refresh another node.
Key pair might have changed and currently we receive a lot of errors from other nodes. Key pair might have changed and currently we receive a lot of errors from other nodes.
- save_file() must truncate file.
-

5
libtorrent/src/torrent.cpp

@ -3283,6 +3283,9 @@ namespace libtorrent
for (std::set<void*>::iterator i = peers.begin() for (std::set<void*>::iterator i = peers.begin()
, end(peers.end()); i != end; ++i) , end(peers.end()); i != end; ++i)
{ {
// [MF] FIXME FIXME: BANNING BY FAILED HASH DISABLED - READ TODO!
continue;
policy::peer* p = static_cast<policy::peer*>(*i); policy::peer* p = static_cast<policy::peer*>(*i);
if (p == 0) continue; if (p == 0) continue;
TORRENT_ASSERT(p->in_use); TORRENT_ASSERT(p->in_use);
@ -3337,7 +3340,7 @@ namespace libtorrent
if (p->connection) if (p->connection)
{ {
#ifdef TORRENT_LOGGING #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
debug_log("*** BANNING PEER: \"%s\" Too many corrupt pieces" debug_log("*** BANNING PEER: \"%s\" Too many corrupt pieces"
, print_endpoint(p->ip()).c_str()); , print_endpoint(p->ip()).c_str());
#endif #endif

Loading…
Cancel
Save