Matt Joiner
4d10fd3496
Fix issue #112
2016-09-12 16:54:43 +10:00
Matt Joiner
011838998e
Add test for issue #111 and #112
2016-09-12 16:53:20 +10:00
Matt Joiner
39f5d76de4
Add a benchmark for readMainLoop piece decoding
2016-09-11 15:43:57 +10:00
Matt Joiner
2fc814b5eb
Move Client.connectionLoop to connection.mainReadLoop
2016-09-11 14:32:56 +10:00
Matt Joiner
5d7882a79d
Remove unused trackerTier and shuffleTier
2016-09-11 14:12:03 +10:00
Matt Joiner
f47fd8c969
Move TorrentSpec stuff into its own file
2016-09-11 14:09:40 +10:00
Ben Gadbois
e34891f42b
Comment typo ( #110 )
2016-09-07 09:43:29 +10:00
Matt Joiner
1100aaa553
Relax the seeder torrent connection stats test
...
The values have changed due to the recent storage change, I'm not sure why, and I don't know if it's important.
2016-09-02 15:26:21 +10:00
Matt Joiner
1e919dd6b1
Rework storage interfaces to make them simpler to implement
...
This allows lots of behaviour to be baked into the new Client, Torrent and Piece wrappers, rather than duplicating (badly) them in all the backend implementations.
2016-09-02 15:10:57 +10:00
Matt Joiner
db3be3441f
storage.boltDB: Some comments, and use global completedValue
2016-08-31 21:00:44 +10:00
Matt Joiner
ab8349eee1
Improve test reliability on Linux and reduce log noise in tests
2016-08-31 20:14:57 +10:00
Matt Joiner
c121615fab
Extract chunkSize as a const
2016-08-31 20:11:04 +10:00
Matt Joiner
1a1676c445
Pass seed option to Config for cmd/torrent ( #108 )
2016-08-31 19:33:54 +10:00
Ye Yin
2fba33d5a2
Pass seed option to Config for cmd/torrent
2016-08-31 17:20:20 +08:00
Matt Joiner
e51cb07f6e
Uncomment the error handling in storage.boltDBPiece.ReadAt
2016-08-31 18:02:45 +10:00
Matt Joiner
3c2db92a83
Add boltdb storage backend
2016-08-31 17:48:50 +10:00
Matt Joiner
945d982877
Comment on PiecePriorityNext
2016-08-30 16:55:50 +10:00
Matt Joiner
8b17d2a63a
Rework Reader position changes affecting piece priorities
...
Torrent.updatePiecePriorities is always followed by Torrent.piecePriorityChanged, so move it into the former function. Also drop the separate mutex for Reader, and add a missing Reader.posChanged call.
2016-08-30 15:41:26 +10:00
Matt Joiner
6c15a030d6
Improve comments
2016-08-30 15:07:59 +10:00
Matt Joiner
792ab183e4
Add a benchmark for an observed slow case with Torrent.updatePiecePriorities
2016-08-30 14:21:50 +10:00
Matt Joiner
7557c9bd4e
Only parse the config listen addr if we have to
...
This fixes a broken benchmark
2016-08-30 14:19:29 +10:00
Matt Joiner
6f7623ff3c
Add missing error return check in benchmark
2016-08-30 14:09:01 +10:00
Matt Joiner
8fd5942722
Make bencode.Bytes work with pointer and nonpointer receivers
2016-08-26 20:29:29 +10:00
Matt Joiner
2a1cef7c9e
Remove the InfoEx type, and don't generate its infohash on the fly
...
Fixes #106 .
2016-08-26 20:29:05 +10:00
Matt Joiner
7b2561cea8
bencode: More renames
2016-08-26 14:51:38 +10:00
Matt Joiner
ebdab2d9de
Add bencode.Bytes
2016-08-26 14:51:09 +10:00
Matt Joiner
f2cbc873a5
bencode: Rename a bunch of slug case stuff
2016-08-26 13:13:30 +10:00
Matt Joiner
e6d7b52638
Speed up connection.lastHelpful
...
Moving to reflection and interfaces has made it a bottleneck.
2016-08-14 22:39:23 +10:00
Matt Joiner
0bd5bcd1a5
cmd/torrentfs: Ensure unmounting occurs for some errors
...
Restructured so other errors can be handled better too.
2016-08-02 11:19:41 +10:00
Matt Joiner
6065a55818
Fix some more races in the status writing
2016-08-02 11:18:33 +10:00
perses
39cf5a7fde
fs: fix isSubPath for top-level directories ( #105 )
2016-08-01 23:56:56 +10:00
Matt Joiner
00f406753a
Fix build error with missinggo.Sorted
2016-07-30 00:48:15 +10:00
Matt Joiner
534275b625
Always run seeder and leecher on the same ports, to flex dht.Socket.CloseNow
2016-07-30 00:42:22 +10:00
Matt Joiner
1ca2e7e95a
Add some extra conditions to prevent network activity when a torrent is closed
...
From suggestions by @axet, this might be a thing sometimes.
2016-07-30 00:41:45 +10:00
Matt Joiner
4143b7470d
Begin exposing all the magic that Client.WriteStatus has so people can parse Client state their own way
...
It wasn't possible to move Client.WriteStatus to an external package to verify it doesn't depend on same-package access to data because then it can't be used in the tests, and it's extremely useful there. So I've settled for not locking the Client, and trying to use all the public methods. It's a work in progress.
2016-07-30 00:37:52 +10:00
Alexey Kuznetsov
49315045a0
it is actually sha1 hash size
2016-07-29 22:50:58 +10:00
perses
7d1443f4eb
torrentfs: fix panic when testPeer is not specified ( #103 )
2016-07-27 12:35:52 +10:00
Matt Joiner
174e7192b5
Merge pull request #101 from perses/master
...
dirwatch: fix panic when attemting to copy func into [20]byte
2016-07-27 12:13:41 +10:00
ctn
a3739fc47c
torrentfs: fix panic when testPeer is not specified
2016-07-26 23:30:40 +03:00
ctn
6525cf19f6
dirwatch: fix panic when attemting to copy func into [20]byte
2016-07-26 22:34:09 +03:00
Matt Joiner
debcb10b08
Some comments helping to break up the blocks in testClientTransfer
2016-07-24 00:35:34 +10:00
Matt Joiner
3c75f68413
Kick connections that contribute the final piece of missing metadata that fails to validate
...
Failing to get metainfo was resetting Torrent.metadataBytes, which caused arriving metadata data to appear to belong to nonexistent pieces, despite passing the check that we'd in fact requested them from the sending connection. This was unnecessarily noisy. Instead return an error if we got all the data, but couldn't set the Torrent's info bytes, that should propagate out and cause the connection that contributed the final missing piece to be dropped. This will at least provide some improved resistance to unfriendly behaviour on the network.
2016-07-24 00:34:40 +10:00
Matt Joiner
14e10ad58d
Use utp.Socket.CloseNow to close a Client's uTP socket on Close
...
Fixes https://github.com/anacrolix/utp/issues/15 .
2016-07-24 00:24:44 +10:00
Matt Joiner
b98c1a7edc
dht: Add counters for writes and write errors
2016-07-23 22:39:06 +10:00
Matt Joiner
980cd69ab2
Break up the DHT announcer code into smaller functions, and add a 5 minute delay between announces
2016-07-23 22:38:31 +10:00
Matt Joiner
5cc735ef32
Merge pull request #99 from hustcat/magnet
...
Add Announce when AnnounceList is nil
2016-07-22 19:58:32 +10:00
Ye Yin
6a2137f2b6
Add Announce when AnnounceList is nil
2016-07-22 15:16:11 +08:00
Matt Joiner
1e8c6808b2
Improve readability of tracker status line
2016-07-14 13:08:52 +10:00
Matt Joiner
f5d58b3dc6
Unused *Client argument to Torrent.writeStatus
2016-07-12 21:23:20 +10:00
Matt Joiner
192bb829fb
Remove duplicate seeder stat test assertions
2016-07-12 18:09:24 +10:00