]> Sergey Matveev's repositories - btrtrc.git/log
btrtrc.git
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.

6 years agoAdd some TODOs
Matt Joiner [Sun, 5 Nov 2017 04:26:23 +0000 (15:26 +1100)]
Add some TODOs

6 years agoAggressive Upload (#203)
Samuel [Sun, 5 Nov 2017 03:04:33 +0000 (03:04 +0000)]
Aggressive Upload (#203)

* Aggressive Upload Config

* Aggressive Upload

* Flip config option.

* Flip Aggressive Upload Config Option

6 years agoAdd missing whitespace
Matt Joiner [Sat, 4 Nov 2017 06:08:02 +0000 (17:08 +1100)]
Add missing whitespace

6 years agomse: Move sliceIter into test file
Matt Joiner [Sat, 4 Nov 2017 06:07:42 +0000 (17:07 +1100)]
mse: Move sliceIter into test file

6 years agoImprove comment on Config.UploadRateLimiter
Matt Joiner [Sat, 4 Nov 2017 06:07:18 +0000 (17:07 +1100)]
Improve comment on Config.UploadRateLimiter

6 years agoImprove upload rate limit burst size panic message
Matt Joiner [Sat, 4 Nov 2017 05:58:38 +0000 (16:58 +1100)]
Improve upload rate limit burst size panic message

Should help with #202.

6 years agoFix copypasta PR ಠ_ಠ
Matt Joiner [Sun, 29 Oct 2017 01:49:58 +0000 (12:49 +1100)]
Fix copypasta PR ಠ_ಠ

6 years agoMerge pull request #201 from dz0ny/fix/http_client
Matt Joiner [Sun, 29 Oct 2017 01:38:31 +0000 (12:38 +1100)]
Merge pull request #201 from dz0ny/fix/http_client

Provide trackers specific http client

6 years agoProvide trackers specific http client
dz0ny [Sat, 28 Oct 2017 14:29:36 +0000 (16:29 +0200)]
Provide trackers specific http client

Mainly follows https://medium.com/@nate510/don-t-use-go-s-default-http-client-4804cb19f779
but also disables HTTPS certificate verification.

6 years agoAdd a test for bdecoding consecutive dicts
Matt Joiner [Thu, 26 Oct 2017 03:25:59 +0000 (14:25 +1100)]
Add a test for bdecoding consecutive dicts

6 years agoMerge pull request #198 from BruceWangNo1/patch-1
Matt Joiner [Sun, 22 Oct 2017 03:41:19 +0000 (14:41 +1100)]
Merge pull request #198 from BruceWangNo1/patch-1

Update "Other public projects using torrent" section on README.md

6 years agoUpdate "Other public projects using torrent" section on README.md
Bruce Wang [Sat, 21 Oct 2017 12:10:29 +0000 (07:10 -0500)]
Update "Other public projects using torrent" section on README.md

I having been using your project for downloading torrent on my server for a couple of weeks now and it works very well. Thanks for your contribution! I used to use a simple HTTP file server to retrieve the downloaded files to my computer. As I used this cumbersome approach heavily on a daily basis, I began to implement a tool to download torrent efficiently just by running a local command with the magnet link which sends torrent download request to the server. You may find my current working prototype sloppy but please check out my project.

6 years agocmd/torrent-metainfo-pprint: Include metainfo's url-list in output
Matt Joiner [Sat, 14 Oct 2017 05:41:14 +0000 (16:41 +1100)]
cmd/torrent-metainfo-pprint: Include metainfo's url-list in output

Helps with testing #197.

6 years agoRemove debug log message
Matt Joiner [Thu, 12 Oct 2017 06:52:26 +0000 (17:52 +1100)]
Remove debug log message

6 years agoFix fs test link now that Debian 9.2 came out
Matt Joiner [Thu, 12 Oct 2017 06:52:15 +0000 (17:52 +1100)]
Fix fs test link now that Debian 9.2 came out

6 years agoIf closing a connection Conn fails we can't do anything, and there's nothing to say
Matt Joiner [Thu, 12 Oct 2017 06:51:47 +0000 (17:51 +1100)]
If closing a connection Conn fails we can't do anything, and there's nothing to say

6 years agoAdd apt-get update to CI
Matt Joiner [Thu, 12 Oct 2017 05:32:11 +0000 (16:32 +1100)]
Add apt-get update to CI

6 years agoTrack completion known to implementation state
Matt Joiner [Thu, 12 Oct 2017 05:09:32 +0000 (16:09 +1100)]
Track completion known to implementation state

Addresses #193

6 years agoAvoid race condition in test
Matt Joiner [Thu, 12 Oct 2017 05:06:14 +0000 (16:06 +1100)]
Avoid race condition in test

6 years agoPerformance optimizations to calculating bytes left in Torrent
Matt Joiner [Sat, 23 Sep 2017 05:28:13 +0000 (15:28 +1000)]
Performance optimizations to calculating bytes left in Torrent

Was generating significant overhead in cmd/torrent

6 years agostorage: Remove incorrect comment
Matt Joiner [Sat, 23 Sep 2017 05:27:26 +0000 (15:27 +1000)]
storage: Remove incorrect comment

6 years agoChanges to Bitmap referencing
Matt Joiner [Sat, 23 Sep 2017 05:27:10 +0000 (15:27 +1000)]
Changes to Bitmap referencing

6 years agoImplement new request strategy
Matt Joiner [Sat, 23 Sep 2017 05:25:47 +0000 (15:25 +1000)]
Implement new request strategy

The new strategy, 2, has the fastest connection download by priority in order, and all other pieces stick to a randomized ordering that's stable per connection.

6 years agofs: Some test tidying
Matt Joiner [Fri, 22 Sep 2017 03:46:00 +0000 (13:46 +1000)]
fs: Some test tidying

6 years agoIt looks like Torrent.worstBadConn was returning an arbitrary bad connection, it...
Matt Joiner [Thu, 21 Sep 2017 09:32:03 +0000 (19:32 +1000)]
It looks like Torrent.worstBadConn was returning an arbitrary bad connection, it wasn't the worst

heap.Init got lost somewhere along the way? Need a unit test for this.

6 years agoReduce system call overhead reading from connections
Matt Joiner [Thu, 21 Sep 2017 09:29:56 +0000 (19:29 +1000)]
Reduce system call overhead reading from connections

6 years agofs/test.sh: umount requires sudo
Matt Joiner [Mon, 18 Sep 2017 03:51:05 +0000 (13:51 +1000)]
fs/test.sh: umount requires sudo

6 years agoAlso post cancels
Matt Joiner [Mon, 18 Sep 2017 03:47:49 +0000 (13:47 +1000)]
Also post cancels

Should mean that we don't have to wait for the peer requests low water mark before we process chunks to cancel.

6 years agoAbstract out making a cancel message
Matt Joiner [Mon, 18 Sep 2017 03:42:42 +0000 (13:42 +1000)]
Abstract out making a cancel message

6 years agostorage: Don't add empty mmaps to the mmap span
Matt Joiner [Mon, 18 Sep 2017 03:41:19 +0000 (13:41 +1000)]
storage: Don't add empty mmaps to the mmap span