Commit Graph

1687 Commits

Author SHA1 Message Date
Matt Joiner 52524925d2 Add separate piece priorities, and cache pending pieces
Should fix a bug where prioritizing files is not alone sufficient to trigger downloading.
2018-01-25 17:18:36 +11:00
Matt Joiner e3c098441a Add Torrent.setInfo 2018-01-25 17:10:37 +11:00
Matt Joiner 4807d05018 Improve some comments 2018-01-25 17:02:52 +11:00
Matt Joiner 21108bf6ec Fix file piece index offset calculations 2018-01-25 17:01:29 +11:00
Matt Joiner 29aa07f1a9 Don't lock Client in File.DisplayPath 2018-01-25 16:58:49 +11:00
Matt Joiner 3f9a78e096 Run benchmarks in CI 2018-01-25 16:57:38 +11:00
Matt Joiner d5f8440e7e Add some helpful comments to type PeerID 2018-01-25 13:14:37 +11:00
Matt Joiner 51b3374015 Add very tentative UPnP NAT traversal
Relates to #230
2018-01-25 13:14:20 +11:00
Matt Joiner 358c6c8649 cmd/torrent: Fix logging when progress bar and stderr are the same file 2018-01-25 13:12:46 +11:00
Matt Joiner ddd1e90d45 Fix cmd/torrent -debug 2018-01-25 13:11:32 +11:00
Matt Joiner 9285470cc6 Improve some log messages 2018-01-25 13:10:52 +11:00
Matt Joiner 0b553b296f Add File priorities
Fixes #220.
2018-01-21 22:49:12 +11:00
Matt Joiner 696595a76e Add comment explaining Torrent.requestStrategy 2018-01-12 12:24:51 +11:00
Matt Joiner ed7e3f6ec0 Make Torrent.pendingPieces a priority bitmap in preparation for #220 2018-01-12 12:24:37 +11:00
Matt Joiner e686523178 storage: Export NewSqlitePieceCompletion 2018-01-12 11:09:33 +11:00
Matt Joiner d5e2d7ce99 storage: Don't check completion state on every write 2018-01-12 10:45:19 +11:00
Matt Joiner f3ff3821ec file storage: Report errors getting completion 2018-01-12 10:41:42 +11:00
Matt Joiner 78e23734d4 Clarify the PieceCompletion.Set method bool argument 2018-01-11 22:10:52 +11:00
Matt Joiner a82c76defb Update sqlite3 piece completion 2018-01-11 22:10:00 +11:00
Matt Joiner 89ea4c0e29 Fix mentions of TorrentDataOpener 2018-01-11 17:11:54 +11:00
Matt Joiner fe9839f818 sortimports 2018-01-09 23:12:01 +11:00
Matt Joiner 09218898e9 Use NoSync with bolt storage and piece completion
Fixes terrible slowness on Linux.
2018-01-09 23:11:34 +11:00
Matt Joiner 6239a83bd6 Begin restructuring testutil to support testing torrents with various properties 2018-01-09 17:29:31 +11:00
Matt Joiner 659be3d366 Add some TODOs and tidy a test 2018-01-09 17:26:46 +11:00
Matt Joiner 8eb1a3effe Screen negative pieces
Should fix #228.
2018-01-09 17:26:01 +11:00
Denis aa42704976 fixing wrong offset in request (#226) 2018-01-08 11:03:34 +11:00
Matt Joiner 554b8e3e0c Improve comments on Config.{Upload,Download}RateLimiter
See #225
2018-01-07 20:31:10 +11:00
Matt Joiner 9626134211 File.offset wasn't applied to the reads on the Torrent 2018-01-07 19:26:24 +11:00
Matt Joiner ff6f28f87c Fix a log format string 2018-01-07 19:24:00 +11:00
Matt Joiner 7f48246119 Improve various File related doc comments 2018-01-07 11:57:02 +11:00
Matt Joiner 87a033e074 Readers obtained from File.NewReader should not readahead into other Files
Fixes #221. Additionally Torrent.length is a pointer and isn't set until the info is available to avoid it defaulting to zero.
2018-01-06 23:15:41 +11:00
Matt Joiner 4d1451f979 Rename File.PrioritizeRegion to DownloadRegion
Fixes #223
2018-01-06 16:54:17 +11:00
Matt Joiner 2f616b9d8b megacheck and staticcheck fixes 2018-01-06 16:53:40 +11:00
Matt Joiner 7b668237bc cmd/torrent-pick: Close file Reader 2018-01-06 16:41:05 +11:00
Matt Joiner 23363506f5 Reader: Changing responsiveness should wake blocked reads 2018-01-06 16:40:35 +11:00
Matt Joiner 57fec52371 mmap_span: Synchronize access to memory maps to avoid race when unmapping 2018-01-06 16:39:52 +11:00
Matt Joiner 6bcf2a58b2 storage: Rename mmapStorage->mmapClientImpl 2018-01-06 16:38:41 +11:00
Matt Joiner 56109b387d Formatting and comments 2018-01-06 16:37:40 +11:00
Matt Joiner 9b718566ba Add File.NewReader
Fixes #222
2018-01-06 16:37:13 +11:00
Matt Joiner e13b0eccbf Make peerID a public type
Wanted it applied to Client Status output
2018-01-06 15:50:45 +11:00
Matt Joiner c44ee5fec4 Use peerID type more, and make its Stringer output nicer 2018-01-06 12:34:31 +11:00
Matt Joiner a0f8f246e5 Add the fs test torrent to the repo
Debian keep moving it.
2017-12-29 13:50:26 +11:00
Matt Joiner a0172f7c6e Update error message in metainfo.Info.writeFiles
I think it was ripped out of some other code a long time ago.
2017-12-29 12:18:55 +11:00
Matt Joiner 5ac3e9ae54 Introduce metainfo.HashSize
This will be useful when BitTorrent 2 is implemented, and helps with creating arbitrary Info.Pieces
2017-12-29 12:17:58 +11:00
Matt Joiner 8195e8df7b Improve some doc comments 2017-12-29 12:16:05 +11:00
Matt Joiner f408e19a7a Survive panics while writing chunks
Also improve the comment on that code
2017-12-29 12:15:33 +11:00
Matt Joiner 898db894e0 When queuing a piece for hashing after receiving a chunk, clear all the dirty chunks
This should fix a bug triggered by storage inconsistencies.
2017-12-28 23:59:30 +11:00
Matt Joiner 25cf92502d Improve a log message 2017-12-28 23:58:07 +11:00
Matt Joiner c672491337
Merge pull request #219 from elgatito/http_user_agent
adding http user-agent setters and usage
2017-12-28 21:05:55 +11:00
Denis Kuzmenok 455a414204 adding http user-agent setters and usage 2017-12-28 10:47:51 +02:00