2
0
mirror of synced 2025-02-24 14:48:27 +00:00

1119 Commits

Author SHA1 Message Date
Matt Joiner
94d764e6be Readers changing wasn't triggering waitAccept
Caused occasional stall in TestSeedAfterDownloading.
2016-01-25 04:14:19 +11:00
Matt Joiner
9091c0518d Use pendingPieces in needData 2016-01-24 15:21:31 +11:00
Matt Joiner
0ad4dda9fc Move fillRequests and replenishConnRequests into connection.go 2016-01-24 15:21:17 +11:00
Matt Joiner
cafac95de4 Delete finished pieces from pending 2016-01-19 01:41:53 +11:00
Matt Joiner
9f79838033 require->assert in test 2016-01-19 01:41:33 +11:00
Matt Joiner
2f40c48d37 Fix the download/prioritize piece functions
This involves adding a pendingPieces field to torrent.
2016-01-19 01:28:56 +11:00
Matt Joiner
df07d93330 dht: Start timer under transaction lock
Satisfies race detector
2016-01-19 00:34:40 +11:00
Matt Joiner
fe9d5702f6 Fixes for torrent.Reader not having ReadAt 2016-01-18 20:12:51 +11:00
Matt Joiner
08c0c49c4a Remove internal/pieceordering 2016-01-18 20:11:53 +11:00
Matt Joiner
06445f2a1e It's working and the tests are usually passing
I still need to handle "prefetch"-style downloading, and some functions haven't been committed to force this issue.
2016-01-18 18:35:14 +11:00
Matt Joiner
8bbfcfcaa4 Resurrect some comments on Torrent methods 2016-01-17 01:49:34 +11:00
Matt Joiner
1a20ac23da Reexport Torrent.MetaInfo 2016-01-17 01:49:04 +11:00
Matt Joiner
89a6a20af6 Finally make Torrent.torrent private
A lot of code was using unintentionally exported stuff from the embedded *torrent in Torrent.
2016-01-17 00:14:15 +11:00
Matt Joiner
8696f32e58 Make Config.DHTConfig not a pointer 2016-01-17 00:12:53 +11:00
Matt Joiner
2beb5f8bd4 Track dirty chunks, instead of pending chunk specs
This is the first step toward having purely Reader-based priorities. If a chunk is pending, that currently implies that we want to download it. I want to move that kind of state out to the readers.
2016-01-13 17:11:59 +11:00
Matt Joiner
153c13db43 Revert "Merge pull request #54 from zhulik/master"
This reverts commit 5cf75b869c469196a8473c4962b99a450daaeeec, reversing
changes made to 09050ff2c5607f3991e6ec6422ed57ba0dee0bad.
2016-01-06 12:19:49 +11:00
Matt Joiner
5dabd3ed03 dataBackend/http: Replace connection pooling code with forced HTTP2 2016-01-06 12:10:40 +11:00
Matt Joiner
5cf75b869c Merge pull request #54 from zhulik/master
Mocking  improvements
2016-01-05 19:56:53 +11:00
Gleb Sinyavsky
48c3df2d43 Refactorings 2016-01-05 11:48:16 +03:00
Gleb Sinyavsky
8637086ef9 Merge branch 'master' of https://github.com/anacrolix/torrent 2016-01-04 15:39:08 +03:00
Matt Joiner
09050ff2c5 Some missing hunks that fix build 2016-01-04 22:56:36 +11:00
Matt Joiner
3208fac438 Failure to announce on one tracker isn't very interesting 2016-01-04 22:54:19 +11:00
Matt Joiner
3c446086af Add Have and Bitfield connection methods 2016-01-04 22:37:49 +11:00
Matt Joiner
8346ff81f7 Switch to int from peer_protocol.Integer for piece index in a lot of places 2016-01-04 22:34:24 +11:00
Gleb Sinyavsky
be8e44da3c peersKey is a public type now 2015-12-27 15:27:32 +03:00
Gleb Sinyavsky
fd34e0a3c1 Download.Peers() func added 2015-12-27 15:19:39 +03:00
Gleb Sinyavsky
052a899f60 cmd utils fixed 2015-12-27 14:59:07 +03:00
Gleb Sinyavsky
5b790bf874 Torrent structs replaced with Download interface in exported Client methods 2015-12-27 14:49:15 +03:00
Matt Joiner
a0f374ce8d Check piece completion state as soon as a handle to torrent data is obtained from a piece store
This helps flex the new concurrency implementation in the piece store http backend
2015-12-25 01:33:10 +11:00
Matt Joiner
08f8d7bd19 Limit parallelism at the piece store http backend connection level instead of at the request level
This is in preparation for improvements that HTTP2 should provide.
2015-12-25 01:31:50 +11:00
Matt Joiner
674066c448 data/pieceStore/{blob->data}.go: More appropriate file name 2015-12-25 01:26:15 +11:00
Matt Joiner
812f5af66b Switch from launchpad.net/gommap to github.com/edsrzf/mmap-go for Windows support
Fixes #45.
2015-12-23 03:50:34 +11:00
Matt Joiner
f9a04b4f29 Suppress log message regarding bad tracker URLs 2015-12-23 03:32:24 +11:00
Matt Joiner
9697a9371a Fix #47
Forgot to remove a non-deferred sync.Mutex.Unlock
2015-12-23 03:31:39 +11:00
Matt Joiner
4015031420 dht: announce_peer should not occur to insecure nodes
Additionally, we now announce even if a token wasn't provided. Why not.
2015-12-18 00:50:22 +11:00
Matt Joiner
e8ff870994 dht: Except local network addresses from security checks 2015-12-17 23:51:50 +11:00
Matt Joiner
127fad47dd dht: Move security tests into separate file 2015-12-17 23:36:57 +11:00
Matt Joiner
f09c0cd2ec dht: Move security functions into new file 2015-12-17 23:22:39 +11:00
Matt Joiner
565fb20139 Add OnQuery hook, thanks to Cathal Garvey 2015-12-16 15:20:37 +11:00
Matt Joiner
6d8310d2df Test improvements 2015-12-16 15:16:53 +11:00
Matt Joiner
44ec4d9bdb Add NodeIdHex config option 2015-12-16 15:15:59 +11:00
Matt Joiner
4798907da4 Add NoDefaultBootstrap and use it and testify in a few tests 2015-12-16 15:13:32 +11:00
Matt Joiner
86b0c02eac Use testify for some tests 2015-12-16 15:06:23 +11:00
Matt Joiner
8a6ae76686 Standardize Torrent method receivers 2015-12-12 14:03:25 +11:00
Matt Joiner
86c4c609f1 Expose Torrent.SetDisplayName 2015-12-12 14:03:04 +11:00
Matt Joiner
83045db3e5 Docs 2015-12-12 14:00:07 +11:00
Matt Joiner
b66aa07a4d data/pieceStore: Improve error message when pieces fail to write 2015-12-11 03:05:40 +11:00
Matt Joiner
672e3c4136 Don't consider a peer to have touched a piece if a chunk isn't written successfully
This prevents peers being banned when there are issues with the data service locally.
2015-12-11 03:04:04 +11:00
Matt Joiner
8c37ff73af CopyURL moved to httptoo 2015-12-11 03:02:45 +11:00
Matt Joiner
5aca9d3563 Rewrite cmd/dht-ping 2015-12-08 00:45:42 +11:00