Open master255 opened 1 year ago
Sounds like a bad idea.
The current Hash checks the hashes of every single Block in the File not the file itself as far as i know. This hashes are contained in the .torrent file.
Infos: https://en.wikipedia.org/wiki/Torrent_file#File_structure
@Milbret You are talking to a professional who made his own torrent library, DHT library, torrent streaming via https protocol, fast torrent files update. Obviously your level is too low to understand what is written here :)
What kind of professional? Seams like you missed a lot of stuff here to understand how torrent hashing work.
If you have your own torrent library why should libtorrent add something that technical doesn't make any sense? This "Feature" wouldn't ensure that the torrent is valid in any way. If a single bit of one block is invalid, then the whole file is. With this Feature you would ignore invalid blocks as long as the path, file size and "maybe" the Date of last modification is identical. With that a malicious client or a user with broken files could send garbage and you would accept it as valid. Doesn't sound professional at all ;-) And i don't see who wants to use it but clearly you could provide a use case for this.
This is an optional file check. Additional to the basic functionality. Libtorrent has a mechanism for detecting corrupted files during distribution. So there will be no problem with cheating other clients. Already all torrent clients have the ability to add an already downloaded torrent without checking the data at all, and this option will do a quick check. This will save users a lot of time.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@arvidn It is necessary to add a new flag and algorithm to torrent_session to check files more quickly. Now the checking is done by calculating file hashes. The new flag will mean checking with three parameters:
If these three parameters match, consider the file verified.