Misc comment and doco cleanup.

This commit is contained in:
Dave Collins 2013-08-08 12:45:20 -05:00
parent 52416ec28f
commit f80bc8c8f9
4 changed files with 13 additions and 10 deletions

View file

@ -19,7 +19,8 @@ import (
"time"
)
// used by the dns seed code to pick a random last seen time
// These constants are used by the dns seed code to pick a random last seen
// time.
const (
secondsIn3Days int32 = 24 * 60 * 60 * 3
secondsIn4Days int32 = 24 * 60 * 60 * 4

View file

@ -45,9 +45,9 @@ type config struct {
MaxPeers int `long:"maxpeers" description:"Max number of inbound and outbound peers"`
BanDuration time.Duration `long:"banduration" description:"How long to ban misbehaving peers. Valid time units are {s, m, h}. Minimum 1 second"`
VerifyDisabled bool `long:"noverify" description:"Disable block/transaction verification -- WARNING: This option can be dangerous and is for development use only"`
RpcUser string `short:"u" long:"rpcuser" description:"Username for rpc connections"`
RpcPass string `short:"P" long:"rpcpass" description:"Password for rpc connections"`
RpcPort string `short:"r" long:"rpcport" description:"Listen for json/rpc messages on this port"`
RpcUser string `short:"u" long:"rpcuser" description:"Username for RPC connections"`
RpcPass string `short:"P" long:"rpcpass" description:"Password for RPC connections"`
RpcPort string `short:"r" long:"rpcport" description:"Listen for JSON/RPC messages on this port"`
DisableRpc bool `long:"norpc" description:"Disable built-in RPC server -- NOTE: The RPC server is disabled by default if no rpcuser/rpcpass is specified"`
DisableDNSSeed bool `long:"nodnsseed" description:"Disable DNS seeding for peers"`
Proxy string `long:"proxy" description:"Connect via SOCKS5 proxy (eg. 127.0.0.1:9050)"`
@ -120,6 +120,8 @@ func removeDuplicateAddresses(addrs []string) []string {
return result
}
// normalizeAndRemoveDuplicateAddresses return a new slice with all the passed
// addresses normalized and duplicates removed.
func normalizeAndRemoveDuplicateAddresses(addrs []string) []string {
for i, addr := range addrs {
addrs[i] = normalizePeerAddress(addr)

View file

@ -144,9 +144,9 @@ func torLookupIP(host, proxy string) ([]net.IP, error) {
return addr, nil
}
// dnsDiscover looks up the list of peers resolved by dns for all hosts in
// seeders. If proxy is not "" then this is used as a tor proxy for the
// resolution. If any errors occur then that seeder that errored will not have
// dnsDiscover looks up the list of peers resolved by DNS for all hosts in
// seeders. If proxy is not "" then it is used as a tor proxy for the
// resolution. If any errors occur then the seeder that errored will not have
// any hosts in the list. Therefore if all hosts failed an empty slice of
// strings will be returned.
func dnsDiscover(seeders []string, proxy string) []net.IP {

View file

@ -15,7 +15,7 @@
; The SOCKS5 proxy above is Tor (https://www.torproject.org).
; Although not required if the proxy set is indeed Tor, setting this option
; does the following:
; - Sends DNS queries over the Tor network (during dns seed lookup). This
; - Sends DNS queries over the Tor network (during DNS seed lookup). This
; stops your IP from being leaked via DNS.
; - Does not disable the listening port. This allows the hidden services
; feature of Tor to be used.
@ -47,7 +47,7 @@
; specified.
; ------------------------------------------------------------------------------
; Secure the RPC api by specifying the username and password. You must specify
; Secure the RPC API by specifying the username and password. You must specify
; both or the RPC server will be disabled.
; rpcuser=whatever_username_you_want
; rpcpass=