2
0
mirror of synced 2025-02-23 22:28:11 +00:00

1581 Commits

Author SHA1 Message Date
Matt Joiner
03227bf461 metainfo: FileInfo.Offset failed with single-file torrents 2017-01-04 18:09:17 +11:00
Matt Joiner
174cc0e183 Reduce the priority given to earlier pieces. Maximum priority reads at the end of the file aren’t getting enough attention. 2017-01-04 18:08:29 +11:00
Matt Joiner
51bae0a3c8 metainfo: Add helper methods to FileInfo 2017-01-04 17:15:11 +11:00
Matt Joiner
984a69c73a Merge pull request #144 from BonkaBonka/fastfail
Abort verify at first hash mismatch.
2017-01-04 14:42:59 +11:00
BonkaBonka
25990f44ee Abort verify at first hash mismatch. 2017-01-03 21:44:19 -05:00
Matt Joiner
9cf09dba8a Remove unused funcs and idents 2017-01-01 11:03:02 +11:00
Matt Joiner
186b5073d2 Move method queuePieceCheck 2017-01-01 11:02:37 +11:00
Matt Joiner
d48c7c8e36 sort imports 2017-01-01 11:01:41 +11:00
Matt Joiner
65295eb513 Panic if NewHashFromHex gets a bad string 2017-01-01 10:08:45 +11:00
Matt Joiner
d8ca4ac92a Rewrite cmd/torrent-verify
Fixes #141
2017-01-01 10:08:45 +11:00
Matt Joiner
c4b1cd35bb Update README.md
Add Trickl android app
2016-12-31 19:17:00 +11:00
Matt Joiner
0973b66b7e Update README.md
Closes #143
2016-12-31 19:07:02 +11:00
Matt Joiner
b68d7cd08e dht/… moved to github.com/anacrolix/dht 2016-12-14 11:43:37 +11:00
Matt Joiner
70dfd099f1 Rename dht/krpc.KRPCError -> Error 2016-12-13 14:50:42 +11:00
Matt Joiner
e80846998c dht: Reply with Method Unknown error to unknown query methods received 2016-12-13 14:45:40 +11:00
Matt Joiner
bb4d344235 Fix race condition in TestPieceHashFailed 2016-12-13 14:44:00 +11:00
Barsanuphe
86c5b20e3f Added optional source flag to torrent files (#137) 2016-12-09 13:16:56 +11:00
Matt Joiner
f510c5cf22 Fix piece failures not clearing dirty chunks
I don’t like how complicated piece completion/hashing management is, but it works.
2016-12-06 16:10:10 +11:00
Matt Joiner
2f9405bd8e Merge commit 'c8dffdb' 2016-12-06 15:43:00 +11:00
Matt Joiner
c8dffdbb11 Add test that dirty chunks are cleared on piece hash failure 2016-12-06 15:41:08 +11:00
Matt Joiner
74be3d58e5 Reader.Close: Don’t set t to nil, we may still expect it
For example in goroutines spawned in ReadContext.
2016-12-05 22:00:26 +11:00
Matt Joiner
75b959099f iplist: Begin adding support for parsing CIDR lists 2016-12-01 15:41:52 +11:00
Matt Joiner
af7a0d3464 Add Torrent.Closed 2016-11-30 18:02:39 +11:00
Matt Joiner
9d35196cca cmd/torrent: Accept infohash: scheme torrents 2016-11-30 18:02:21 +11:00
Matt Joiner
1f2f037209 Fix logging of trust slice 2016-11-30 18:01:39 +11:00
Matt Joiner
97f6cb496e Avoid deadlock caused by receiving PORT and and DHT announce_peer at the same time 2016-11-28 00:03:10 +11:00
Matt Joiner
8b50f5fa7a Fix deadlock in Client.onDHTAnnouncePeer 2016-11-27 14:43:21 +11:00
Matt Joiner
f451a39b69 Fix harmless race conditions in Client.WriteStatus introduced way back 2016-11-27 14:26:45 +11:00
Matt Joiner
79310dd264 dht.NewServer: Initialize the tokenServer 2016-11-27 02:22:47 +11:00
Matt Joiner
4a7fbf6170 Add peers received from received announce_peer DHT messages to the Client
Addresses #133
2016-11-27 00:05:19 +11:00
Matt Joiner
3d043ffc39 dht.Server: Return valid token from get_peers, and handle incoming announce_peer
Addresses #133.
2016-11-26 16:14:37 +11:00
Matt Joiner
aa697794cc Remove unused function 2016-11-25 17:24:29 +11:00
Matt Joiner
d7416af930 Remove completed TODO item 2016-11-25 17:24:16 +11:00
Matt Joiner
fdf75d59c8 Kick only the worst connection when a piece fails a check 2016-11-23 12:59:23 +11:00
Matt Joiner
57b679ffb0 Add a note about dropping connections that we sent a HAVE for incomplete pieces 2016-11-23 11:52:41 +11:00
Matt Joiner
4807c9e29a Make Torrent.conns a map
Can't remember if I've tried this before. But dropping arbitrary connections while iterating established conns will become much simpler.
2016-11-23 11:48:44 +11:00
Matt Joiner
ebbd555e7b Move a bunch of Client methods onto more appropriate types 2016-11-22 21:12:53 +11:00
Matt Joiner
389898bb84 tracker: Support the original http response peers format
Fixes #130
2016-11-22 15:40:46 +11:00
Matt Joiner
90ca45dd2d Don't accept pieces with bad indexes
Fixes #132
2016-11-22 14:20:48 +11:00
Matt Joiner
84d243afca Rename connection.downloadedChunk -> receiveChunk 2016-11-22 14:18:09 +11:00
Matt Joiner
6f9bcff8b2 Make downloadedChunk a method of connection 2016-11-22 14:17:30 +11:00
Matt Joiner
0d9348c5d1 Move Client.downloadedChunk to connection.go 2016-11-22 14:16:18 +11:00
Matt Joiner
d193dd0479 TODO 2016-11-22 14:01:17 +11:00
Matt Joiner
3602d90b65 gofmt simplify 2016-11-22 14:01:09 +11:00
Matt Joiner
04dedcef9f metainfo: Remove unused import 2016-11-08 21:09:04 +11:00
Vincent
7d327905fe feat: remove print BuildFromFilePath
removes the print of (path, err) in function BuildFromFilePath
2016-11-05 09:56:31 +11:00
Matt Joiner
dc7428db54 Reader.Close: Prefer to lock Client in public method 2016-10-31 19:05:33 +11:00
Matt Joiner
df60a765a7 Torrent.unpendPieces: Only update unpended pieces
Updating all pieces at once is no longer faster. (There was an optimization for this a while ago that no longer exists.)
2016-10-31 19:05:08 +11:00
Matt Joiner
a8e96ce996 When Reader position changes only update piece priorities that may be affected
Seems to significantly reduce CPU load reading from torrents with huge piece counts.
2016-10-31 19:00:08 +11:00
Matt Joiner
95f73db7e4 Ditch the use of generic slices.HeapInterface for finding the worst "bad" connection
It's become a bottleneck. Implement it directly using heap.Interface.
2016-10-31 16:24:48 +11:00