libtorrent todo-list

2 urgent 39 important 50 relevant 4 feasible 190 notes
relevance 4../test/test_dht.cpp:1266pass in the actual salt as a parameter
relevance 4../test/test_dht.cpp:2154pass in th actual salt as the argument
relevance 3../test/test_dht.cpp:118make the mock_socket hold a reference to the list of where to record packets instead of having a global variable
relevance 3../test/test_dht.cpp:127ideally the mock_socket would contain this queue of packets, to make tests independent
relevance 3../test/test_dht.cpp:1223split this up into smaller tests
relevance 3../test/test_dht.cpp:2623use dht_test_setup class to simplify the node setup
relevance 3../test/test_dht.cpp:3168use dht_test_setup class to simplify the node setup
relevance 3../test/test_dht.cpp:3313use dht_test_setup class to simplify the node setup
relevance 3../test/test_dht.cpp:3406use dht_test_setup class to simplify the node setup
relevance 3../src/ut_metadata.cpp:268use the aux::write_* functions and the span here instead, it will fit better with send_buffer()
relevance 3../src/torrent.cpp:461we could probably get away with just saving a few fields here
relevance 3../src/torrent.cpp:766assert there are no outstanding async operations on this torrent
relevance 3../src/torrent.cpp:1401there's some duplication between this function and peer_connection::incoming_piece(). is there a way to merge something?
relevance 3../src/torrent.cpp:4073this could probably be pulled out into a free function
relevance 3../src/torrent.cpp:5051should this alert have an error code in it?
relevance 3../src/torrent.cpp:5110this should return optional<>. piece index -1 should not be allowed
relevance 3../src/session_handle.cpp:695expose the sequence_number, public_key, secret_key and signature types to the client
relevance 3../src/session_impl.cpp:1152closing the udp sockets here means that the uTP connections cannot be closed gracefully
relevance 3../src/session_impl.cpp:1654the logic in this if-block should be factored out into a separate function. At least most of it
relevance 3../src/session_impl.cpp:2624it would be neat if the utp socket manager would handle ICMP errors too
relevance 3../src/session_impl.cpp:4173it would probably make sense to have a separate list of peers that are eligible for optimistic unchoke, similar to the torrents perhaps this could even iterate over the pool allocators of torrent_peer objects. It could probably be done in a single pass and collect the n best candidates. maybe just a queue of peers would make even more sense, just pick the next peer in the queue for unchoking. It would be O(1).
relevance 3../src/session_impl.cpp:4196peers should know whether their torrent is paused or not, instead of having to ask it over and over again
relevance 3../src/session_impl.cpp:4442there should be a pre-calculated list of all peers eligible for unchoking
relevance 3../src/session_impl.cpp:6173use public_key here instead of std::array
relevance 3../src/peer_connection.cpp:3147instead of having to ask the torrent whether it's in graceful pause mode or not, the peers should keep that state (and the torrent should update them when it enters graceful pause). When a peer enters graceful pause mode, it should cancel all outstanding requests and clear its request queue.
relevance 3../src/peer_connection.cpp:4038once peers are properly put in graceful pause mode, they can cancel all outstanding requests and this test can be removed.
relevance 3../src/peer_connection.cpp:4715new_piece should be an optional. piece index -1 should not be allowed
relevance 3../src/web_peer_connection.cpp:200this should be an optional, piece index -1 should not be allowed
relevance 3../src/web_peer_connection.cpp:420do we really need a special case here? wouldn't the multi-file case handle single file torrents correctly too?
relevance 3../src/web_peer_connection.cpp:514file_index_t should not allow negative values
relevance 3../src/web_peer_connection.cpp:710this could be made more efficient for the case when we use an HTTP proxy. Then we wouldn't need to add new web seeds to the torrent, we could just make the redirect table contain full URLs.
relevance 3../src/kademlia/rpc_manager.cpp:71move this into it's own .cpp file