69 Commits

Author SHA1 Message Date
Arvid Norberg 6e9c9102f8 add feature to only validate the v2 hashes for hybrid torrents 2026-04-02 00:52:22 +02:00
Arvid Norberg fe101a3cae deprecate torrent_info constructors that load torrents 2025-02-14 08:33:58 +01:00
Arvid Norberg b616aa1f4a deprecate storing piece layers in torrent_info, in favor of add_torrent_params 2025-02-13 20:05:34 +01:00
arvidn e65623b317 add a simpler overload to bencode() returning a vector<char> 2022-12-19 02:57:06 +01:00
arvidn 6dd1e88cb1 introduce new API for create_torrent, to phase out the use of file_storage for creating torrents. Having a double-use for it complicates things 2022-10-09 08:23:43 +02:00
arvidn 24a42189f4 merged RC_2_0 into master 2022-09-24 16:22:22 +02:00
arvidn 31cedce075 fix bug in hash_picker with empty files 2022-09-23 19:25:01 +02:00
arvidn e950d14775 fix uses of deprecated functions in simulations 2022-09-23 17:04:16 +02:00
arvidn 964ffc57ba merge RC_2_0 into master 2022-06-23 08:07:28 +02:00
arvidn d3d8bc7101 Merge branch 'RC_2_0' 2021-12-26 11:54:36 +01:00
arvidn 096544cfd1 factor out test_transfer_matrix into its own test executable 2021-12-08 08:15:36 +01:00
arvidn d8faaeef2c merged RC_2_0 into master 2021-11-04 21:04:33 +01:00
arvidn 6717bd91a1 fix issue where incoming uTP connections were not accepted over SOCKS5 2021-10-30 11:47:37 +02:00
arvidn 0f8e466d5b improve merkle_tree tests by using an odd number of blocks 2021-10-26 12:48:00 +02:00
arvidn bc4c8d13e8 overhaul the merkle_tree class in order to allow it to have a consistent (and well defined) invariant. This involves merging add_hashes() and add_proofs(), also move the verified blocks bitfield from hash_picker into merkle_tree. 2021-10-26 12:48:00 +02:00
arvidn 1af84c3c6d extend test_transfer to test a whole matrix of all combinations of test parameters 2021-10-26 12:48:00 +02:00
arvidn 34d78c500d test_disk_io.set_files 2021-10-26 12:48:00 +02:00
arvidn 083f3bd404 fix issue with stalled pieces on disk full errors 2021-10-19 13:31:37 +02:00
arvidn ab19b94d96 merged RC_2_0 into master 2021-09-28 11:32:16 +02:00
arvidn aa08941afc add support for larger pieces and multiple files in test_transfer 2021-09-27 10:58:46 +02:00
arvidn ccde042217 simplify test_transfer simulation by factoring out common code 2021-09-26 17:04:43 +02:00
arvidn 6bdb8b5526 factor out using namespace lt in test_transfer 2021-09-26 17:04:43 +02:00
arvidn 139bf34b0c test receiving corrupt data 2021-09-11 12:57:50 +02:00
arvidn 233b98c200 merged RC_2_0 into master 2021-07-24 14:54:48 -07:00
arvidn 73cfd18660 fix simulated disk io to support arbitrary pad files. add test 2021-07-12 14:41:25 -07:00
arvidn c13f94b0de add force-recheck to test_transfer simulation, and simplify the tests slightly 2021-07-12 14:41:25 -07:00
arvidn 2db8b54c08 update copyright headers in source files 2021-06-13 21:04:55 +02:00
arvidn 1a4e276980 transfer tests for torrents with various pad file layouts 2021-06-13 11:14:37 +02:00
arvidn face5f0b93 add simulated disk I/O to the simulations, and use it in test_transfers. Add tests exercising the disk full condition, and ensure an auto-managed torrent will eventually recover, once there is disk space available 2021-05-05 14:24:03 +02:00
Arvid Norberg 456c9448a5 add new torrent_file_with_hashes() which includes piece layers (#6083)
for creating .torrent files
2021-03-28 08:29:42 +02:00
arvidn 6ca777228c Merge branch 'RC_1_2' into RC_2_0 2021-03-20 16:39:52 +01:00
arvidn c850eeaeb3 fix issue with setting file priorities and saving resume data. The need-save-resume flag should not be set until *after* the new file priorities have been applied. Don't set the need-save-resume flag just by loading the resume data (when applying the file priorities into the piece priorities) 2021-03-20 10:35:52 +01:00
arvidn 32975be1d0 restore add_torrent_params::info_hash and use add_torrent_params::info_hashes for the new v1 and v2 type 2020-08-16 08:27:20 -07:00
arvidn 6e9f05ab9f restore info_hash() API and name the v2 API info_hashes() 2020-05-30 14:00:24 +02:00
Arvid Norberg ae1d4f581f merged RC_1_2 into master 2019-09-07 17:34:10 +02:00
arvidn 9b1607a63c fix updating of is_finished torrent status, when changing piece priorities 2019-09-07 10:45:25 +02:00
arvidn f78b6b7e0a merged RC_1_2 into master 2019-08-31 12:35:00 +02:00
arvidn 521dea4824 merged RC_1_2 into master 2019-08-18 08:59:44 +02:00
arvidn 07ab3b9739 add feature to create an affinity to pick adjecent pieces aligned to 4MiB extents. It's an attempt to improve disk I/O, by writing larger contiguous ranges of bytes. It's off by default. 2019-08-17 12:32:47 +02:00
arvidn d3e22a7bc7 add tests for transferring v2-only torrents 2019-08-10 09:28:38 -07:00
arvidn 3494961a68 some work on getting simulations to work 2019-02-11 20:19:08 +01:00
arvidn 8305c40d6a make disk_interface the customization point for storage, rather than storage_interface
remove the disk cache
remove trim_cache disk job
remove zero-storage
mark default_storage_constructor as deprecated
remove storage_interface
remove file_pool and default_storage_constructor. update connection_tester to use disk_io_thread.
only ftruncate files once
optimize hashing, by running sha1 directly on the memory mapped file
use boost-multi_index in file_view_pool
remove flush_piece and flush_hashed, simplify job-fence logic, remove prep_read_job_impl
support noatime
split out mmap implementation into a .cpp file
support hashing of content in part files. wraps up new disk storage
remove flush_piece disk job
separate out store_buffer into its own class
pass session_settings into storage operations instead of assigning a pointer in the storage object
use unordered_map in store_buffer
add fopen-based disk io back-end for non-64 bit systems or systems without mmap
factor out open_mode_t into its own header
first stab at windows memory mapped files support
build all of boost for autotools
remove flag in async_read callback handler
remove old open_mode_t, preadv/readv and coalesce buffers
support sparse and no_cache file flags in mmap
Remove use of overlapped I/O because we're no longer doing any scatter/gather syscalls the use of overlapped is an unnecessary complication.
don't explicitly specify global read and write. On MINGW we need to use libtorrent::read and libtorrent::write instead of the MINGW provided ::read and ::write.

If the underlying file is empty then m_mapping is expected to be null.
It is the caller's responsibilty to notice that the region's size is
zero and not dereference it in that case.

Otherwise there is no good way for users of default_storage::open_file
to determine that the opened file is empty.
2019-01-20 18:29:42 +01:00
arvidn eab1055938 more warnings on appveyor 2018-11-18 11:49:45 +01:00
arvidn fe612ca167 replace the TORRENT_CFG ABI check with inline namespaces around the symbol that can change ABI based on build configuration options 2018-05-13 19:25:17 +02:00
Arvid Norberg 4523e05527 fix uTP and SOCKS5 simulations and update libsimulator 2018-05-13 12:10:34 +02:00
arvidn 9696082355 merged RC_1_1 into master 2018-02-25 09:36:12 +01:00
arvidn 1ede34da8a undo the patch to restore incoming TCP connections over SOCKS5 2018-02-19 00:01:42 +01:00
arvidn 308cbfe097 merged RC_1_1 into master 2018-01-27 02:36:55 +01:00
arvidn bc4d53c71f restore support for incoming connections over SOCKS5 (disabled by default) 2018-01-25 09:14:14 +01:00
arvidn e19736f925 fix simulation tests to make them not use deprecated functions 2017-07-26 18:00:03 -07:00