Commit graph

14 commits

Author SHA1 Message Date
Dave Collins eb882f39f8 multi: Fix several misspellings in the comments.
This commit corrects several typos in the comments found by misspell.
2016-02-25 11:17:12 -06:00
Dave Collins 6e402deb35 Relicense to the btcsuite developers.
This commit relicenses all code in this repository to the btcsuite
developers.
2015-05-01 12:00:56 -05:00
Dave Collins b5a7d52f21 Add comments to Tor discovery errors. 2015-01-16 10:11:52 -06:00
David Hill ebc5db2710 Lookup each DNS seed in its own go routine.
By putting each DNS seed in its own go routine, btcd can start connecting
to nodes as they are found instead of waiting for all seeds to respond.  This
significantly speeds up startup time.

Additionally, logging was added to show how many addresses were fetched from
each seed.
2014-07-04 16:27:32 -04:00
Tomás Senart a0f20007c5 golint -min_confidence=0.3 .
This commits removes a number of golint warnings. There is a class of
warnings which I can't fix due to unsufficient knowledge of the domain
at this point. These are listed here:

addrmanager.go:907:1: comment on exported method AddrManager.Attempt
should be of the form "Attempt ..."
addrmanager.go:1048:1: exported function RFC1918 should have comment or
be unexported
addrmanager.go:1058:1: exported function RFC3849 should have comment or
be unexported
addrmanager.go:1065:1: exported function RFC3927 should have comment or
be unexported
addrmanager.go:1073:1: exported function RFC3964 should have comment or
be unexported
addrmanager.go:1081:1: exported function RFC4193 should have comment or
be unexported
addrmanager.go:1089:1: exported function RFC4380 should have comment or
be unexported
addrmanager.go:1097:1: exported function RFC4843 should have comment or
be unexported
addrmanager.go:1105:1: exported function RFC4862 should have comment or
be unexported
addrmanager.go:1113:1: exported function RFC6052 should have comment or
be unexported
addrmanager.go:1121:1: exported function RFC6145 should have comment or
be unexported
addrmanager.go:1128:1: exported function Tor should have comment or be
unexported
addrmanager.go:1143:1: exported function Local should have comment or be
unexported
addrmanager.go:1228:2: exported const InterfacePrio should have comment
(or a comment on this block) or be unexported
discovery.go:26:2: exported var ErrTorInvalidAddressResponse should have
comment or be unexported
limits/limits_unix.go:19:1: exported function SetLimits should have
comment or be unexported
limits/limits_windows.go:7:1: exported function SetLimits should have
comment or be unexported
util/dropafter/dropafter.go:22:6: exported type ShaHash should have
comment or be unexported
util/dropafter/dropafter.go:38:2: exported const ArgSha should have
comment (or a comment on this block) or be unexported
util/dropafter/dropafter.go:128:5: exported var ErrBadShaPrefix should
have comment or be unexported
util/dropafter/dropafter.go:129:5: exported var ErrBadShaLen should have
comment or be unexported
util/dropafter/dropafter.go:130:5: exported var ErrBadShaChar should
have comment or be unexported
util/showblock/showblock.go:24:6: exported type ShaHash should have
comment or be unexported
util/showblock/showblock.go:46:2: exported const ArgSha should have
comment (or a comment on this block) or be unexported
util/showblock/showblock.go:163:1: exported function DumpBlock should
have comment or be unexported
util/showblock/showblock.go:211:5: exported var ErrBadShaPrefix should
have comment or be unexported
util/showblock/showblock.go:212:5: exported var ErrBadShaLen should have
comment or be unexported
util/showblock/showblock.go:213:5: exported var ErrBadShaChar should
have comment or be unexported
2014-07-02 11:01:56 -05:00
Dave Collins d33e9b4165 Unexport and comment btcDial and btcLookup func.
These functions are at the package level and only apply within btcd, so
unexport them to be consistent.
2014-01-10 01:31:20 -06:00
Owain G. Ainsworth dd7c910e86 Enable use of a different proxy for .onion addresses.
This implements --onion (and --onionuser/--onionpass) that enable a
different proxy to be used to connect to .onion addresses. If no main
proxy is supplied then no proxy will be used for non-onion addresses.

Additionally we add --noonion that blocks connection attempts to .onion
addresses entirely (and avoids using tor for proxy dns lookups).

the --tor option has been supersceded and thus removed.

Closes #47
2014-01-07 19:18:09 +00:00
Dave Collins aeec39c1ff Add 2014 to copyright dates. 2014-01-01 10:16:15 -06:00
Dave Collins eb8688df79 Convert btcd to use new btclog package.
Also, make every subsystem within btcd use its own logger instance so each
subsystem can have its own level specified independent of the others.

This is work towards #48.
2013-11-21 17:41:21 -06:00
Dave Collins 10907027b7 Change failure to talk to DNS seeders to debug.
This is just a temporary failure and shouldn't be a warning.  Also,
remove redundant prefix on profile server log print while here.
2013-10-10 20:30:55 -05:00
Dave Collins 24aba3189e Update DISC subsystem log out for consistency. 2013-10-10 18:33:38 -05:00
Owain G. Ainsworth 6c05e9d475 Flesh out addrmanger with some basic functionality.
Use it to add multiple peer support. We try and keep 8 outbound peers
active at all times.

This address manager is not as complete as the one in bitcoind yet, but
additional functionality is being worked on.

We currently handle (in a similar manner to bitcoind):

- biasing between new and already tried addresses based on number of connected
  peers.
- rejection of non-default ports until desparate
- address selection probabilities based on last successful connection and number
  of failures.
- routability checks based on known unroutable subnets.
- only connecting to each network `group' once at any one time.

We currently lack support for:
- tor ``addresses'' (an .onion address encoded in 64 bytes of ip address)
- full state save and restore (we just save a json with the list of known
  addresses in it)
- multiple buckets for new and tried addresses selected by a hash of address and
 source.  The current algorithm functions the same as bitcoind would with only
 one bucket for new and tried (making the address cache rather smaller than it
 otherwise would be).
2013-09-15 20:25:55 -05:00
Dave Collins f80bc8c8f9 Misc comment and doco cleanup. 2013-08-08 12:47:15 -05:00
Dave Collins 8574846e87 Move btcd to root directory.
This allows easier go get paths.
2013-08-07 12:47:51 -05:00
Renamed from btcd/discovery.go (Browse further)