]> Sergey Matveev's repositories - btrtrc.git/log
btrtrc.git
6 years agoFix download rate limiter and add test
Matt Joiner [Sun, 28 Jan 2018 04:28:45 +0000 (15:28 +1100)]
Fix download rate limiter and add test

6 years agoAvoid race in test
Matt Joiner [Sat, 27 Jan 2018 03:31:31 +0000 (14:31 +1100)]
Avoid race in test

6 years agobencode: Add ignore_unmarshal_type_error tag
Matt Joiner [Sat, 27 Jan 2018 03:31:12 +0000 (14:31 +1100)]
bencode: Add ignore_unmarshal_type_error tag

6 years agoInclude torrent stats in status
Matt Joiner [Sat, 27 Jan 2018 01:02:05 +0000 (12:02 +1100)]
Include torrent stats in status

6 years agoImprove Torrent.BytesCompleted comment
Matt Joiner [Sat, 27 Jan 2018 01:01:09 +0000 (12:01 +1100)]
Improve Torrent.BytesCompleted comment

6 years agoUpdate LICENSE
Matt Joiner [Sat, 27 Jan 2018 00:21:33 +0000 (11:21 +1100)]
Update LICENSE

6 years agobencode: Give more descriptive errors when failing to parse dicts
Matt Joiner [Thu, 25 Jan 2018 10:46:50 +0000 (21:46 +1100)]
bencode: Give more descriptive errors when failing to parse dicts

6 years agoFix peer_protocol benchmark
Matt Joiner [Thu, 25 Jan 2018 06:43:45 +0000 (17:43 +1100)]
Fix peer_protocol benchmark

6 years agoAdd TODO
Matt Joiner [Thu, 25 Jan 2018 06:43:33 +0000 (17:43 +1100)]
Add TODO

6 years agoFix benchmark job in CI
Matt Joiner [Thu, 25 Jan 2018 06:20:07 +0000 (17:20 +1100)]
Fix benchmark job in CI

6 years agoAdd separate piece priorities, and cache pending pieces
Matt Joiner [Thu, 25 Jan 2018 06:18:36 +0000 (17:18 +1100)]
Add separate piece priorities, and cache pending pieces

Should fix a bug where prioritizing files is not alone sufficient to trigger downloading.

6 years agoAdd Torrent.setInfo
Matt Joiner [Thu, 25 Jan 2018 06:10:37 +0000 (17:10 +1100)]
Add Torrent.setInfo

6 years agoImprove some comments
Matt Joiner [Thu, 25 Jan 2018 06:02:52 +0000 (17:02 +1100)]
Improve some comments

6 years agoFix file piece index offset calculations
Matt Joiner [Thu, 25 Jan 2018 06:01:29 +0000 (17:01 +1100)]
Fix file piece index offset calculations

6 years agoDon't lock Client in File.DisplayPath
Matt Joiner [Thu, 25 Jan 2018 05:58:49 +0000 (16:58 +1100)]
Don't lock Client in File.DisplayPath

6 years agoRun benchmarks in CI
Matt Joiner [Thu, 25 Jan 2018 05:57:38 +0000 (16:57 +1100)]
Run benchmarks in CI

6 years agoAdd some helpful comments to type PeerID
Matt Joiner [Thu, 25 Jan 2018 02:14:37 +0000 (13:14 +1100)]
Add some helpful comments to type PeerID

6 years agoAdd very tentative UPnP NAT traversal
Matt Joiner [Thu, 25 Jan 2018 02:14:20 +0000 (13:14 +1100)]
Add very tentative UPnP NAT traversal

Relates to #230

6 years agocmd/torrent: Fix logging when progress bar and stderr are the same file
Matt Joiner [Thu, 25 Jan 2018 02:12:46 +0000 (13:12 +1100)]
cmd/torrent: Fix logging when progress bar and stderr are the same file

6 years agoFix cmd/torrent -debug
Matt Joiner [Thu, 25 Jan 2018 02:11:32 +0000 (13:11 +1100)]
Fix cmd/torrent -debug

6 years agoImprove some log messages
Matt Joiner [Thu, 25 Jan 2018 02:10:52 +0000 (13:10 +1100)]
Improve some log messages

6 years agoAdd File priorities
Matt Joiner [Sun, 21 Jan 2018 11:49:12 +0000 (22:49 +1100)]
Add File priorities

Fixes #220.

6 years agoAdd comment explaining Torrent.requestStrategy
Matt Joiner [Fri, 12 Jan 2018 01:24:51 +0000 (12:24 +1100)]
Add comment explaining Torrent.requestStrategy

6 years agoMake Torrent.pendingPieces a priority bitmap in preparation for #220
Matt Joiner [Fri, 12 Jan 2018 01:24:37 +0000 (12:24 +1100)]
Make Torrent.pendingPieces a priority bitmap in preparation for #220

6 years agostorage: Export NewSqlitePieceCompletion
Matt Joiner [Fri, 12 Jan 2018 00:09:33 +0000 (11:09 +1100)]
storage: Export NewSqlitePieceCompletion

6 years agostorage: Don't check completion state on every write
Matt Joiner [Thu, 11 Jan 2018 23:45:19 +0000 (10:45 +1100)]
storage: Don't check completion state on every write

6 years agofile storage: Report errors getting completion
Matt Joiner [Thu, 11 Jan 2018 23:41:42 +0000 (10:41 +1100)]
file storage: Report errors getting completion

6 years agoClarify the PieceCompletion.Set method bool argument
Matt Joiner [Thu, 11 Jan 2018 11:10:52 +0000 (22:10 +1100)]
Clarify the PieceCompletion.Set method bool argument

6 years agoUpdate sqlite3 piece completion
Matt Joiner [Thu, 11 Jan 2018 11:10:00 +0000 (22:10 +1100)]
Update sqlite3 piece completion

6 years agoFix mentions of TorrentDataOpener
Matt Joiner [Thu, 11 Jan 2018 06:11:54 +0000 (17:11 +1100)]
Fix mentions of TorrentDataOpener

6 years agosortimports
Matt Joiner [Tue, 9 Jan 2018 12:12:01 +0000 (23:12 +1100)]
sortimports

6 years agoUse NoSync with bolt storage and piece completion
Matt Joiner [Tue, 9 Jan 2018 12:11:34 +0000 (23:11 +1100)]
Use NoSync with bolt storage and piece completion

Fixes terrible slowness on Linux.

6 years agoBegin restructuring testutil to support testing torrents with various properties
Matt Joiner [Tue, 9 Jan 2018 06:29:31 +0000 (17:29 +1100)]
Begin restructuring testutil to support testing torrents with various properties

6 years agoAdd some TODOs and tidy a test
Matt Joiner [Tue, 9 Jan 2018 06:26:46 +0000 (17:26 +1100)]
Add some TODOs and tidy a test

6 years agoScreen negative pieces
Matt Joiner [Tue, 9 Jan 2018 06:26:01 +0000 (17:26 +1100)]
Screen negative pieces

Should fix #228.

6 years agofixing wrong offset in request (#226)
Denis [Mon, 8 Jan 2018 00:03:34 +0000 (02:03 +0200)]
fixing wrong offset in request (#226)

6 years agoImprove comments on Config.{Upload,Download}RateLimiter
Matt Joiner [Sun, 7 Jan 2018 09:31:10 +0000 (20:31 +1100)]
Improve comments on Config.{Upload,Download}RateLimiter

See #225

6 years agoFile.offset wasn't applied to the reads on the Torrent
Matt Joiner [Sun, 7 Jan 2018 08:26:24 +0000 (19:26 +1100)]
File.offset wasn't applied to the reads on the Torrent

6 years agoFix a log format string
Matt Joiner [Sun, 7 Jan 2018 08:24:00 +0000 (19:24 +1100)]
Fix a log format string

6 years agoImprove various File related doc comments
Matt Joiner [Sun, 7 Jan 2018 00:57:02 +0000 (11:57 +1100)]
Improve various File related doc comments

6 years agoReaders obtained from File.NewReader should not readahead into other Files
Matt Joiner [Sat, 6 Jan 2018 12:15:41 +0000 (23:15 +1100)]
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.

6 years agoRename File.PrioritizeRegion to DownloadRegion
Matt Joiner [Sat, 6 Jan 2018 05:54:17 +0000 (16:54 +1100)]
Rename File.PrioritizeRegion to DownloadRegion

Fixes #223

6 years agomegacheck and staticcheck fixes
Matt Joiner [Sat, 6 Jan 2018 05:53:40 +0000 (16:53 +1100)]
megacheck and staticcheck fixes

6 years agocmd/torrent-pick: Close file Reader
Matt Joiner [Sat, 6 Jan 2018 05:41:05 +0000 (16:41 +1100)]
cmd/torrent-pick: Close file Reader

6 years agoReader: Changing responsiveness should wake blocked reads
Matt Joiner [Sat, 6 Jan 2018 05:40:35 +0000 (16:40 +1100)]
Reader: Changing responsiveness should wake blocked reads

6 years agommap_span: Synchronize access to memory maps to avoid race when unmapping
Matt Joiner [Sat, 6 Jan 2018 05:39:52 +0000 (16:39 +1100)]
mmap_span: Synchronize access to memory maps to avoid race when unmapping

6 years agostorage: Rename mmapStorage->mmapClientImpl
Matt Joiner [Sat, 6 Jan 2018 05:38:41 +0000 (16:38 +1100)]
storage: Rename mmapStorage->mmapClientImpl

6 years agoFormatting and comments
Matt Joiner [Sat, 6 Jan 2018 05:37:40 +0000 (16:37 +1100)]
Formatting and comments

6 years agoAdd File.NewReader
Matt Joiner [Sat, 6 Jan 2018 05:37:13 +0000 (16:37 +1100)]
Add File.NewReader

Fixes #222

6 years agoMake peerID a public type
Matt Joiner [Sat, 6 Jan 2018 04:50:45 +0000 (15:50 +1100)]
Make peerID a public type

Wanted it applied to Client Status output

6 years agoUse peerID type more, and make its Stringer output nicer
Matt Joiner [Sat, 6 Jan 2018 01:34:31 +0000 (12:34 +1100)]
Use peerID type more, and make its Stringer output nicer

6 years agoAdd the fs test torrent to the repo
Matt Joiner [Fri, 29 Dec 2017 02:50:26 +0000 (13:50 +1100)]
Add the fs test torrent to the repo

Debian keep moving it.

6 years agoUpdate error message in metainfo.Info.writeFiles
Matt Joiner [Fri, 29 Dec 2017 01:18:55 +0000 (12:18 +1100)]
Update error message in metainfo.Info.writeFiles

I think it was ripped out of some other code a long time ago.

6 years agoIntroduce metainfo.HashSize
Matt Joiner [Fri, 29 Dec 2017 01:17:58 +0000 (12:17 +1100)]
Introduce metainfo.HashSize

This will be useful when BitTorrent 2 is implemented, and helps with creating arbitrary Info.Pieces

6 years agoImprove some doc comments
Matt Joiner [Fri, 29 Dec 2017 01:16:05 +0000 (12:16 +1100)]
Improve some doc comments

6 years agoSurvive panics while writing chunks
Matt Joiner [Fri, 29 Dec 2017 01:15:33 +0000 (12:15 +1100)]
Survive panics while writing chunks

Also improve the comment on that code

6 years agoWhen queuing a piece for hashing after receiving a chunk, clear all the dirty chunks
Matt Joiner [Thu, 28 Dec 2017 12:59:30 +0000 (23:59 +1100)]
When queuing a piece for hashing after receiving a chunk, clear all the dirty chunks

This should fix a bug triggered by storage inconsistencies.

6 years agoImprove a log message
Matt Joiner [Thu, 28 Dec 2017 12:58:07 +0000 (23:58 +1100)]
Improve a log message

6 years agoMerge pull request #219 from elgatito/http_user_agent
Matt Joiner [Thu, 28 Dec 2017 10:05:55 +0000 (21:05 +1100)]
Merge pull request #219 from elgatito/http_user_agent

adding http user-agent setters and usage

6 years agoadding http user-agent setters and usage
Denis Kuzmenok [Thu, 28 Dec 2017 08:47:51 +0000 (10:47 +0200)]
adding http user-agent setters and usage

6 years agoadded disable_libutp build flag usage (#215)
Denis [Wed, 6 Dec 2017 00:56:26 +0000 (02:56 +0200)]
added disable_libutp build flag usage (#215)

6 years agoLog dropping of bad peers in debug mode only
Matt Joiner [Sun, 3 Dec 2017 02:44:37 +0000 (13:44 +1100)]
Log dropping of bad peers in debug mode only

6 years agomissinggo.LimitLen changed
Matt Joiner [Sun, 3 Dec 2017 02:44:08 +0000 (13:44 +1100)]
missinggo.LimitLen changed

6 years agoCode comments
Matt Joiner [Sat, 2 Dec 2017 13:35:09 +0000 (00:35 +1100)]
Code comments

6 years agoTest that mmap size doesn't exceed system memory address width
Matt Joiner [Fri, 1 Dec 2017 23:26:09 +0000 (10:26 +1100)]
Test that mmap size doesn't exceed system memory address width

Should fix http://paste.ubuntu.com/26074620/

6 years agoFix panic in Torrent.addrActive if there are closed connections
Matt Joiner [Fri, 1 Dec 2017 23:01:27 +0000 (10:01 +1100)]
Fix panic in Torrent.addrActive if there are closed connections

Fixes #214

6 years agoFix the Stats panic in #214
Matt Joiner [Fri, 1 Dec 2017 22:58:08 +0000 (09:58 +1100)]
Fix the Stats panic in #214

6 years agoSynchronize access to storage
Matt Joiner [Fri, 1 Dec 2017 12:09:07 +0000 (23:09 +1100)]
Synchronize access to storage

6 years agoRemove racy part of test
Matt Joiner [Fri, 1 Dec 2017 12:08:53 +0000 (23:08 +1100)]
Remove racy part of test

6 years agoImprove issue #211 test name
Matt Joiner [Fri, 1 Dec 2017 07:13:21 +0000 (18:13 +1100)]
Improve issue #211 test name

6 years agosortimports
Matt Joiner [Fri, 1 Dec 2017 07:12:29 +0000 (18:12 +1100)]
sortimports

6 years agoAdd test for #211
Matt Joiner [Fri, 1 Dec 2017 07:11:20 +0000 (18:11 +1100)]
Add test for #211

6 years agoTorrent.bytesLeft was taking a copy instead of pointer to Piece
Matt Joiner [Fri, 1 Dec 2017 06:58:42 +0000 (17:58 +1100)]
Torrent.bytesLeft was taking a copy instead of pointer to Piece

6 years agoPublish piece state changes after verifying piece
Matt Joiner [Fri, 1 Dec 2017 03:03:05 +0000 (14:03 +1100)]
Publish piece state changes after verifying piece

6 years agobencode.scanner.ReadByte returned errors when it shouldn't have
Matt Joiner [Fri, 10 Nov 2017 12:44:24 +0000 (23:44 +1100)]
bencode.scanner.ReadByte returned errors when it shouldn't have

6 years agobencode: Handle encoding big.Ints
Matt Joiner [Wed, 8 Nov 2017 10:34:24 +0000 (21:34 +1100)]
bencode: Handle encoding big.Ints

6 years agobencode: Tidy import block
Matt Joiner [Wed, 8 Nov 2017 09:58:35 +0000 (20:58 +1100)]
bencode: Tidy import block

6 years agoMerge commit '6ab65a49a8a72dea1a28968b2ab42a85fd4566ec'
Matt Joiner [Wed, 8 Nov 2017 09:23:15 +0000 (20:23 +1100)]
Merge commit '6ab65a49a8a72dea1a28968b2ab42a85fd4566ec'

# Conflicts:
# config.go

6 years agometainfo: Omit empty Metainfo.InfoBytes
Matt Joiner [Wed, 8 Nov 2017 08:57:05 +0000 (19:57 +1100)]
metainfo: Omit empty Metainfo.InfoBytes

6 years agoTorrent.Metainfo: Don't return incomplete metadata bytes
Matt Joiner [Wed, 8 Nov 2017 08:56:20 +0000 (19:56 +1100)]
Torrent.Metainfo: Don't return incomplete metadata bytes

Fixes #208

6 years agocmd/torrent-metainfo-pprint: Just take a single metainfo to stdin
Matt Joiner [Wed, 8 Nov 2017 08:33:05 +0000 (19:33 +1100)]
cmd/torrent-metainfo-pprint: Just take a single metainfo to stdin

Move processing into its own function too.

6 years agoAdd a test for behaviour after getting metadata_size and before GotInfo
Matt Joiner [Wed, 8 Nov 2017 08:31:10 +0000 (19:31 +1100)]
Add a test for behaviour after getting metadata_size and before GotInfo

#208

6 years agoThe "m" field in the extended handshake is not mandatory
Matt Joiner [Wed, 8 Nov 2017 08:29:55 +0000 (19:29 +1100)]
The "m" field in the extended handshake is not mandatory

6 years agoConfig.Debug isn't just for logging
Matt Joiner [Wed, 8 Nov 2017 08:29:01 +0000 (19:29 +1100)]
Config.Debug isn't just for logging

6 years agoMake Client.PeerID return [20]byte
Matt Joiner [Wed, 8 Nov 2017 08:28:37 +0000 (19:28 +1100)]
Make Client.PeerID return [20]byte

6 years agoGeneralise use of peerExtensionBytes
Matt Joiner [Wed, 8 Nov 2017 08:28:03 +0000 (19:28 +1100)]
Generalise use of peerExtensionBytes

6 years agoMove some code around
Matt Joiner [Wed, 8 Nov 2017 04:00:18 +0000 (15:00 +1100)]
Move some code around

6 years agofeat(config): Allows the torrent client to customise the client identity and connecti...
themihai [Tue, 7 Nov 2017 18:14:13 +0000 (20:14 +0200)]
feat(config): Allows the torrent client to customise the client identity and connection config

6 years agoFix #205
Matt Joiner [Tue, 7 Nov 2017 13:34:59 +0000 (00:34 +1100)]
Fix #205

6 years agoMore megacheck
Matt Joiner [Tue, 7 Nov 2017 13:12:34 +0000 (00:12 +1100)]
More megacheck

6 years agoApply megacheck to torrent package
Matt Joiner [Tue, 7 Nov 2017 05:11:59 +0000 (16:11 +1100)]
Apply megacheck to torrent package

6 years agoFix a lot of noisy logging and test warnings
Matt Joiner [Tue, 7 Nov 2017 05:00:08 +0000 (16:00 +1100)]
Fix a lot of noisy logging and test warnings

6 years agoUnbiased request ordering was requesting chunks the peer doesn't have
Matt Joiner [Mon, 6 Nov 2017 03:53:00 +0000 (14:53 +1100)]
Unbiased request ordering was requesting chunks the peer doesn't have

6 years agoIgnore expected error
Matt Joiner [Mon, 6 Nov 2017 03:01:07 +0000 (14:01 +1100)]
Ignore expected error

6 years agoAdd a link to Trickl
Matt Joiner [Mon, 6 Nov 2017 02:42:46 +0000 (13:42 +1100)]
Add a link to Trickl

6 years agoComment on bencode.Decoder.Offset
Matt Joiner [Sun, 5 Nov 2017 04:45:30 +0000 (15:45 +1100)]
Comment on bencode.Decoder.Offset

6 years agoExpose bencode.Decoder.Offset
Matt Joiner [Sun, 5 Nov 2017 04:42:37 +0000 (15:42 +1100)]
Expose bencode.Decoder.Offset

6 years agoRemove noisy log message
Matt Joiner [Sun, 5 Nov 2017 04:39:00 +0000 (15:39 +1100)]
Remove noisy log message

6 years agobencode: Implement unbuffered scanner used by NewDecoder
Matt Joiner [Sun, 5 Nov 2017 04:38:09 +0000 (15:38 +1100)]
bencode: Implement unbuffered scanner used by NewDecoder

Minimizes unused reads into the input Reader stream

6 years agoKick connections requesting pieces we don't have
Matt Joiner [Sun, 5 Nov 2017 04:27:21 +0000 (15:27 +1100)]
Kick connections requesting pieces we don't have

This was removed at some point, and made the requests received for missing pieces expvar unused.