]> Sergey Matveev's repositories - btrtrc.git/log
btrtrc.git
8 years agoAlso fix "context" in reader_test.go
Matt Joiner [Sat, 30 Apr 2016 01:46:45 +0000 (11:46 +1000)]
Also fix "context" in reader_test.go

8 years agoUgh, "context" isn't in go 1.6
Matt Joiner [Sat, 30 Apr 2016 01:33:07 +0000 (11:33 +1000)]
Ugh, "context" isn't in go 1.6

8 years agoAdd Reader.ReadContext
Matt Joiner [Sat, 30 Apr 2016 01:08:29 +0000 (11:08 +1000)]
Add Reader.ReadContext

Allows cancelling reads etc. Torrents that get stuck can result in Reads that won't return until the torrent is dropped.

8 years agoSome changes to metainfo.InfoEx and testutil
Matt Joiner [Sat, 30 Apr 2016 01:07:29 +0000 (11:07 +1000)]
Some changes to metainfo.InfoEx and testutil

8 years agoFix crash when peers have sent undersized bitfields and we get the torrent info
Matt Joiner [Fri, 29 Apr 2016 18:08:02 +0000 (04:08 +1000)]
Fix crash when peers have sent undersized bitfields and we get the torrent info

8 years agoChange the behaviour of Torrent.Length with when info isn't available
Matt Joiner [Wed, 20 Apr 2016 10:10:39 +0000 (20:10 +1000)]
Change the behaviour of Torrent.Length with when info isn't available

8 years agoImprove some docs
Matt Joiner [Wed, 20 Apr 2016 10:10:10 +0000 (20:10 +1000)]
Improve some docs

8 years agoFix receiver pointeriness for some File methods
Matt Joiner [Tue, 19 Apr 2016 07:20:31 +0000 (17:20 +1000)]
Fix receiver pointeriness for some File methods

8 years agocmd/torrent: Add -addr flag back in
Matt Joiner [Tue, 19 Apr 2016 07:20:14 +0000 (17:20 +1000)]
cmd/torrent: Add -addr flag back in

8 years agoMerge pull request #79 from shoenig/normalize
Matt Joiner [Tue, 19 Apr 2016 07:10:42 +0000 (17:10 +1000)]
Merge pull request #79 from shoenig/normalize

refactor struct identifiers to follow conventional go names

8 years agorefactor struct identifiers to follow conventional go names
Seth Hoenig [Tue, 19 Apr 2016 04:11:11 +0000 (23:11 -0500)]
refactor struct identifiers to follow conventional go names

8 years agoImprove doc on Torrent.Drop
Matt Joiner [Mon, 18 Apr 2016 11:52:30 +0000 (21:52 +1000)]
Improve doc on Torrent.Drop

https://github.com/anacrolix/torrent/issues/73

8 years agocmd/torrent: Forget trying to expose the entire Client config struct to the command...
Matt Joiner [Mon, 18 Apr 2016 11:30:28 +0000 (21:30 +1000)]
cmd/torrent: Forget trying to expose the entire Client config struct to the command-line

8 years agocmd/torrent: Remove redundant _ "net/http/pprof" import
Matt Joiner [Mon, 18 Apr 2016 11:29:37 +0000 (21:29 +1000)]
cmd/torrent: Remove redundant _ "net/http/pprof" import

It's done by envpprof instead

8 years agopiece-file storage: Use the receiver-local FileStore field
Matt Joiner [Thu, 14 Apr 2016 07:28:30 +0000 (17:28 +1000)]
piece-file storage: Use the receiver-local FileStore field

Because aliens, mainly.

8 years agoMerge all our global consts and vars into global.go
Matt Joiner [Thu, 14 Apr 2016 07:19:07 +0000 (17:19 +1000)]
Merge all our global consts and vars into global.go

For easier referral to other parties.

8 years agoComments and logs around bad metadata size
Matt Joiner [Thu, 7 Apr 2016 09:13:51 +0000 (19:13 +1000)]
Comments and logs around bad metadata size

8 years agoFix possible deadlock
Matt Joiner [Mon, 4 Apr 2016 10:39:57 +0000 (20:39 +1000)]
Fix possible deadlock

8 years agoFix Config.IPBlocklist type
Matt Joiner [Mon, 4 Apr 2016 06:23:30 +0000 (16:23 +1000)]
Fix Config.IPBlocklist type

8 years agoiplist: Add helper to mmap in a packed blocklist
Matt Joiner [Mon, 4 Apr 2016 06:23:05 +0000 (16:23 +1000)]
iplist: Add helper to mmap in a packed blocklist

8 years agoApply ineffassign linter
Matt Joiner [Mon, 4 Apr 2016 05:39:26 +0000 (15:39 +1000)]
Apply ineffassign linter

8 years agoApply unconvert linter
Matt Joiner [Mon, 4 Apr 2016 05:28:25 +0000 (15:28 +1000)]
Apply unconvert linter

8 years agoRemove more deadcode
Matt Joiner [Mon, 4 Apr 2016 05:23:05 +0000 (15:23 +1000)]
Remove more deadcode

8 years agoRemove deadcode
Matt Joiner [Mon, 4 Apr 2016 05:18:51 +0000 (15:18 +1000)]
Remove deadcode

8 years agoRemove unused orderedList
Matt Joiner [Mon, 4 Apr 2016 05:10:39 +0000 (15:10 +1000)]
Remove unused orderedList

8 years agoRemove some of the magic ConfigDir stuff
Matt Joiner [Mon, 4 Apr 2016 04:04:48 +0000 (14:04 +1000)]
Remove some of the magic ConfigDir stuff

This might become a helper. Torrent file cache still remains.

8 years agoMove Magnet and friends into metainfo package
Matt Joiner [Mon, 4 Apr 2016 03:48:39 +0000 (13:48 +1000)]
Move Magnet and friends into metainfo package

8 years agoMerge pull request #72 from shoenig/magnetize
Matt Joiner [Mon, 4 Apr 2016 03:20:15 +0000 (13:20 +1000)]
Merge pull request #72 from shoenig/magnetize

convenience function for creating magnets

8 years agoUse metainfo.Hash for piece and info hashes
Matt Joiner [Mon, 4 Apr 2016 03:01:31 +0000 (13:01 +1000)]
Use metainfo.Hash for piece and info hashes

8 years agoconvenience function for creating magnets
Seth Hoenig [Sun, 3 Apr 2016 13:51:46 +0000 (08:51 -0500)]
convenience function for creating magnets

8 years agoAdding a torrent without info after waitAccept has blocked wouldn't trigger further...
Matt Joiner [Sun, 3 Apr 2016 12:06:25 +0000 (22:06 +1000)]
Adding a torrent without info after waitAccept has blocked wouldn't trigger further accepts immediately

8 years agoFix deadlocks in WriteStatus due to incomplete renaming
Matt Joiner [Sun, 3 Apr 2016 10:54:14 +0000 (20:54 +1000)]
Fix deadlocks in WriteStatus due to incomplete renaming

8 years agoMerge Torrent and torrent types
Matt Joiner [Sun, 3 Apr 2016 08:40:43 +0000 (18:40 +1000)]
Merge Torrent and torrent types

8 years agoComments
Matt Joiner [Sun, 3 Apr 2016 06:52:52 +0000 (16:52 +1000)]
Comments

8 years agoMake everything on type torrent private
Matt Joiner [Sun, 3 Apr 2016 06:50:53 +0000 (16:50 +1000)]
Make everything on type torrent private

8 years agopiece file storage: Don't write to completed pieces
Matt Joiner [Sun, 3 Apr 2016 06:37:50 +0000 (16:37 +1000)]
piece file storage: Don't write to completed pieces

8 years agocmd/torrent-metainfo-pprint: Switch to tagflag for argument parsing
Matt Joiner [Sun, 3 Apr 2016 06:37:17 +0000 (16:37 +1000)]
cmd/torrent-metainfo-pprint: Switch to tagflag for argument parsing

8 years agoIf we fail to write to a piece, check its completion state
Matt Joiner [Sun, 3 Apr 2016 06:36:57 +0000 (16:36 +1000)]
If we fail to write to a piece, check its completion state

8 years agoImprove log messages
Matt Joiner [Sun, 3 Apr 2016 06:36:24 +0000 (16:36 +1000)]
Improve log messages

8 years agoSuppress piece read errors when data is obtained
Matt Joiner [Sun, 3 Apr 2016 06:35:28 +0000 (16:35 +1000)]
Suppress piece read errors when data is obtained

8 years agostorage: Don't read bad completed piece files
Matt Joiner [Sun, 3 Apr 2016 06:33:31 +0000 (16:33 +1000)]
storage: Don't read bad completed piece files

8 years agostorage: Fix io.EOF on short piece files
Matt Joiner [Sat, 2 Apr 2016 05:57:22 +0000 (16:57 +1100)]
storage: Fix io.EOF on short piece files

8 years agoMissing error checks in test
Matt Joiner [Wed, 30 Mar 2016 08:16:40 +0000 (19:16 +1100)]
Missing error checks in test

8 years agoSuppress logging noise in tests
Matt Joiner [Wed, 30 Mar 2016 08:12:57 +0000 (19:12 +1100)]
Suppress logging noise in tests

8 years agoMove storage.FileStore interface to missinggo
Matt Joiner [Wed, 30 Mar 2016 08:12:33 +0000 (19:12 +1100)]
Move storage.FileStore interface to missinggo

8 years agoFix missinggo import
Matt Joiner [Wed, 30 Mar 2016 08:11:55 +0000 (19:11 +1100)]
Fix missinggo import

8 years agoFew fixes for downstream projects
Matt Joiner [Tue, 29 Mar 2016 01:13:03 +0000 (12:13 +1100)]
Few fixes for downstream projects

8 years agoRemove all the old data store packages
Matt Joiner [Tue, 29 Mar 2016 00:14:54 +0000 (11:14 +1100)]
Remove all the old data store packages

8 years agoReimplement piece storage
Matt Joiner [Tue, 29 Mar 2016 00:14:34 +0000 (11:14 +1100)]
Reimplement piece storage

8 years agoFinish fixing tests
Matt Joiner [Mon, 28 Mar 2016 13:24:00 +0000 (00:24 +1100)]
Finish fixing tests

8 years agoMake opening a torrent in storage an explicit method
Matt Joiner [Mon, 28 Mar 2016 11:40:29 +0000 (22:40 +1100)]
Make opening a torrent in storage an explicit method

This is storage types where opening can fail, like mmap

8 years agoGet mmap storage working
Matt Joiner [Mon, 28 Mar 2016 10:57:04 +0000 (21:57 +1100)]
Get mmap storage working

8 years agoNew storage interface
Matt Joiner [Mon, 28 Mar 2016 09:38:30 +0000 (20:38 +1100)]
New storage interface

8 years agodata/file: Rewrite ReadAt
Matt Joiner [Sat, 26 Mar 2016 09:45:31 +0000 (20:45 +1100)]
data/file: Rewrite ReadAt

8 years agodata/file: Add a test checking for io.ErrUnexpectedEOF on short read
Matt Joiner [Sat, 26 Mar 2016 07:30:30 +0000 (18:30 +1100)]
data/file: Add a test checking for io.ErrUnexpectedEOF on short read

8 years agoImprove doc comments on Data
Matt Joiner [Sat, 26 Mar 2016 07:27:28 +0000 (18:27 +1100)]
Improve doc comments on Data

8 years agoTidy up a test that fails with the wrong reasons
Matt Joiner [Thu, 24 Mar 2016 12:52:38 +0000 (23:52 +1100)]
Tidy up a test that fails with the wrong reasons

8 years agoTidy up bytesLeft calculations
Matt Joiner [Tue, 22 Mar 2016 02:11:36 +0000 (13:11 +1100)]
Tidy up bytesLeft calculations

This should fix a bug where completion is shown as negative in WriteStatus

8 years agoLog connection errors when debug mode
Matt Joiner [Tue, 22 Mar 2016 02:10:18 +0000 (13:10 +1100)]
Log connection errors when debug mode

8 years agoAdd a test for bad have messages
Matt Joiner [Tue, 22 Mar 2016 02:09:02 +0000 (13:09 +1100)]
Add a test for bad have messages

The reason for the cleanup to peer have-related messages in the first place.

8 years agoTidy up the peer have{,all,none},bitfield handling
Matt Joiner [Tue, 22 Mar 2016 01:07:03 +0000 (12:07 +1100)]
Tidy up the peer have{,all,none},bitfield handling

8 years agoAdd t.bytesLeftAnnounce
Matt Joiner [Mon, 21 Mar 2016 22:06:48 +0000 (09:06 +1100)]
Add t.bytesLeftAnnounce

Now it's safe to remove tracker specific bytesLeft contract

8 years agoClient.WriteStatus: Raise the precision of the completion percentage
Matt Joiner [Mon, 21 Mar 2016 21:33:08 +0000 (08:33 +1100)]
Client.WriteStatus: Raise the precision of the completion percentage

8 years agoUse missinggo.AddrPort directly
Matt Joiner [Mon, 21 Mar 2016 05:02:36 +0000 (16:02 +1100)]
Use missinggo.AddrPort directly

8 years agoMake peerGotPiece a method on connection
Matt Joiner [Mon, 21 Mar 2016 03:19:51 +0000 (14:19 +1100)]
Make peerGotPiece a method on connection

8 years agoMove peerGotPiece
Matt Joiner [Mon, 21 Mar 2016 03:17:15 +0000 (14:17 +1100)]
Move peerGotPiece

8 years agoAdd some File method comments
Matt Joiner [Sat, 19 Mar 2016 06:40:30 +0000 (17:40 +1100)]
Add some File method comments

8 years agoFavour earlier pieces slightly, helps with in-order downloads
Matt Joiner [Sat, 19 Mar 2016 06:40:18 +0000 (17:40 +1100)]
Favour earlier pieces slightly, helps with in-order downloads

8 years agoFix locks on Reader.SetReadahead
Matt Joiner [Sat, 19 Mar 2016 06:39:56 +0000 (17:39 +1100)]
Fix locks on Reader.SetReadahead

8 years agoUse new missinggo.SplitHostMaybePort implementation
Matt Joiner [Tue, 15 Mar 2016 10:32:47 +0000 (21:32 +1100)]
Use new missinggo.SplitHostMaybePort implementation

8 years agoTrack accepted connections
Matt Joiner [Sun, 6 Mar 2016 06:26:04 +0000 (17:26 +1100)]
Track accepted connections

8 years agoUse missinggo.Event to track Client closed
Matt Joiner [Sat, 5 Mar 2016 08:36:21 +0000 (19:36 +1100)]
Use missinggo.Event to track Client closed

8 years agoFix a UTP Conn leak, on unencrypted followup dial attempts
Matt Joiner [Wed, 2 Mar 2016 12:27:46 +0000 (23:27 +1100)]
Fix a UTP Conn leak, on unencrypted followup dial attempts

I would guess that TCP ones were cleaned up by GC.

8 years agoAdd Reader.Torrent()
Matt Joiner [Wed, 2 Mar 2016 12:26:46 +0000 (23:26 +1100)]
Add Reader.Torrent()

8 years agoExtend the timeout, drone.io is slow?
Matt Joiner [Fri, 26 Feb 2016 11:18:08 +0000 (22:18 +1100)]
Extend the timeout, drone.io is slow?

8 years agoIgnore the corner case when a piece is dropped from storage
Matt Joiner [Fri, 26 Feb 2016 11:12:13 +0000 (22:12 +1100)]
Ignore the corner case when a piece is dropped from storage

8 years agodht: Use missinggo.Event for closing
Matt Joiner [Fri, 26 Feb 2016 11:11:48 +0000 (22:11 +1100)]
dht: Use missinggo.Event for closing

8 years agoAdd test checking that cancel works
Matt Joiner [Fri, 26 Feb 2016 11:10:29 +0000 (22:10 +1100)]
Add test checking that cancel works

8 years agoCatch error creating client in tests
Matt Joiner [Fri, 26 Feb 2016 11:10:09 +0000 (22:10 +1100)]
Catch error creating client in tests

8 years agoFix bad DHT node in tests in constructed torrent
Matt Joiner [Wed, 24 Feb 2016 10:57:30 +0000 (21:57 +1100)]
Fix bad DHT node in tests in constructed torrent

8 years agoAdd DHT nodes from metainfo when added to Client
Matt Joiner [Wed, 24 Feb 2016 10:56:50 +0000 (21:56 +1100)]
Add DHT nodes from metainfo when added to Client

8 years agodht: Rename newDHTAddr->NewAddr, and clean up the interface
Matt Joiner [Tue, 23 Feb 2016 15:02:33 +0000 (02:02 +1100)]
dht: Rename newDHTAddr->NewAddr, and clean up the interface

8 years agodht: Rename dHTAddr to Addr
Matt Joiner [Tue, 23 Feb 2016 14:50:15 +0000 (01:50 +1100)]
dht: Rename dHTAddr to Addr

8 years agoTest that metainfo nodes are added to the DHT
Matt Joiner [Tue, 23 Feb 2016 14:48:44 +0000 (01:48 +1100)]
Test that metainfo nodes are added to the DHT

8 years agometainfo: Check for error unmarshalling bad nodes contents from a metainfo
Matt Joiner [Tue, 23 Feb 2016 12:53:39 +0000 (23:53 +1100)]
metainfo: Check for error unmarshalling bad nodes contents from a metainfo

8 years agodht: Misc trivial improvements
Matt Joiner [Tue, 23 Feb 2016 12:52:30 +0000 (23:52 +1100)]
dht: Misc trivial improvements

8 years agometainfo: Fix use of CastSlice when copying nodes
Matt Joiner [Tue, 23 Feb 2016 11:47:41 +0000 (22:47 +1100)]
metainfo: Fix use of CastSlice when copying nodes

8 years agometainfo: Ensure that nodes encode correctly
Matt Joiner [Tue, 23 Feb 2016 11:37:38 +0000 (22:37 +1100)]
metainfo: Ensure that nodes encode correctly

8 years agometainfo: Support nodes as []string or [](string, int64)
Matt Joiner [Tue, 23 Feb 2016 11:28:23 +0000 (22:28 +1100)]
metainfo: Support nodes as []string or [](string, int64)

Fixes #65.

8 years agometainfo: It looks like the "nodes" field of metainfo was never handled correctly...
Matt Joiner [Tue, 23 Feb 2016 11:04:06 +0000 (22:04 +1100)]
metainfo: It looks like the "nodes" field of metainfo was never handled correctly, support []string instead of [][]string, fix tests

8 years agometainfo tests: Fix some naming conventions
Matt Joiner [Tue, 23 Feb 2016 10:50:07 +0000 (21:50 +1100)]
metainfo tests: Fix some naming conventions

8 years agobencode: Update some test code
Matt Joiner [Tue, 23 Feb 2016 10:47:00 +0000 (21:47 +1100)]
bencode: Update some test code

8 years agobencode tests: Idiomatize identifier naming
Matt Joiner [Tue, 23 Feb 2016 10:43:05 +0000 (21:43 +1100)]
bencode tests: Idiomatize identifier naming

8 years agobencode: Use the testdata convention in tests
Matt Joiner [Tue, 23 Feb 2016 10:31:15 +0000 (21:31 +1100)]
bencode: Use the testdata convention in tests

8 years agoCatch error creating new client in test
Matt Joiner [Mon, 22 Feb 2016 03:30:02 +0000 (14:30 +1100)]
Catch error creating new client in test

8 years agoFix failure to request data from peers if it goes missing after being downloaded...
Matt Joiner [Sun, 21 Feb 2016 16:23:49 +0000 (03:23 +1100)]
Fix failure to request data from peers if it goes missing after being downloaded during the same session

The chunks remained marked dirty, even after the piece was marked complete. So when the piece was not complete, there was nothing to do.

8 years agofs: Fix what looks like a glaring mistake: If Seek failed on the torrent reader,...
Matt Joiner [Sun, 21 Feb 2016 15:44:29 +0000 (02:44 +1100)]
fs: Fix what looks like a glaring mistake: If Seek failed on the torrent reader, it would have got stuck

Since Seek is artificial, and the offsets are usually checked in the caller, it looks like it never failed anyway.

8 years agoFix races in Reader
Matt Joiner [Sun, 21 Feb 2016 15:42:01 +0000 (02:42 +1100)]
Fix races in Reader

8 years agoAdd a client transfer test with limited file cache, and a second pass read
Matt Joiner [Sun, 21 Feb 2016 15:41:07 +0000 (02:41 +1100)]
Add a client transfer test with limited file cache, and a second pass read

8 years agofs: Change listen addrs to localhost in tests
Matt Joiner [Sun, 21 Feb 2016 15:39:49 +0000 (02:39 +1100)]
fs: Change listen addrs to localhost in tests

Seems to improve reliability. Maybe the missinggo.Addr{IP,Port} change did something.