Alphabetize --help output; add missing options to doc.go

This commit is contained in:
Murray Nesbitt 2020-04-14 01:58:45 -07:00 committed by Dave Collins
parent 57d44d022e
commit 9f15a7e6af
7 changed files with 213 additions and 181 deletions

View file

@ -34,15 +34,15 @@ var (
// //
// See loadConfig for details on the configuration load process. // See loadConfig for details on the configuration load process.
type config struct { type config struct {
AddrIndex bool `long:"addrindex" description:"Build a full address-based transaction index which makes the searchrawtransactions RPC available"`
DataDir string `short:"b" long:"datadir" description:"Location of the btcd data directory"` DataDir string `short:"b" long:"datadir" description:"Location of the btcd data directory"`
DbType string `long:"dbtype" description:"Database backend to use for the Block Chain"` DbType string `long:"dbtype" description:"Database backend to use for the Block Chain"`
TestNet3 bool `long:"testnet" description:"Use the test network"` InFile string `short:"i" long:"infile" description:"File containing the block(s)"`
Progress int `short:"p" long:"progress" description:"Show a progress message each time this number of seconds have passed -- Use 0 to disable progress announcements"`
RegressionTest bool `long:"regtest" description:"Use the regression test network"` RegressionTest bool `long:"regtest" description:"Use the regression test network"`
SimNet bool `long:"simnet" description:"Use the simulation test network"` SimNet bool `long:"simnet" description:"Use the simulation test network"`
InFile string `short:"i" long:"infile" description:"File containing the block(s)"` TestNet3 bool `long:"testnet" description:"Use the test network"`
TxIndex bool `long:"txindex" description:"Build a full hash-based transaction index which makes all transactions available via the getrawtransaction RPC"` TxIndex bool `long:"txindex" description:"Build a full hash-based transaction index which makes all transactions available via the getrawtransaction RPC"`
AddrIndex bool `long:"addrindex" description:"Build a full address-based transaction index which makes the searchrawtransactions RPC available"`
Progress int `short:"p" long:"progress" description:"Show a progress message each time this number of seconds have passed -- Use 0 to disable progress announcements"`
} }
// filesExists reports whether the named file or directory exists. // filesExists reports whether the named file or directory exists.

View file

@ -92,20 +92,20 @@ func listCommands() {
// //
// See loadConfig for details on the configuration load process. // See loadConfig for details on the configuration load process.
type config struct { type config struct {
ShowVersion bool `short:"V" long:"version" description:"Display version information and exit"`
ListCommands bool `short:"l" long:"listcommands" description:"List all of the supported commands and exit"`
ConfigFile string `short:"C" long:"configfile" description:"Path to configuration file"` ConfigFile string `short:"C" long:"configfile" description:"Path to configuration file"`
RPCUser string `short:"u" long:"rpcuser" description:"RPC username"` ListCommands bool `short:"l" long:"listcommands" description:"List all of the supported commands and exit"`
RPCPassword string `short:"P" long:"rpcpass" default-mask:"-" description:"RPC password"`
RPCServer string `short:"s" long:"rpcserver" description:"RPC server to connect to"`
RPCCert string `short:"c" long:"rpccert" description:"RPC server certificate chain for validation"`
NoTLS bool `long:"notls" description:"Disable TLS"` NoTLS bool `long:"notls" description:"Disable TLS"`
Proxy string `long:"proxy" description:"Connect via SOCKS5 proxy (eg. 127.0.0.1:9050)"` Proxy string `long:"proxy" description:"Connect via SOCKS5 proxy (eg. 127.0.0.1:9050)"`
ProxyUser string `long:"proxyuser" description:"Username for proxy server"`
ProxyPass string `long:"proxypass" default-mask:"-" description:"Password for proxy server"` ProxyPass string `long:"proxypass" default-mask:"-" description:"Password for proxy server"`
TestNet3 bool `long:"testnet" description:"Connect to testnet"` ProxyUser string `long:"proxyuser" description:"Username for proxy server"`
RPCCert string `short:"c" long:"rpccert" description:"RPC server certificate chain for validation"`
RPCPassword string `short:"P" long:"rpcpass" default-mask:"-" description:"RPC password"`
RPCServer string `short:"s" long:"rpcserver" description:"RPC server to connect to"`
RPCUser string `short:"u" long:"rpcuser" description:"RPC username"`
SimNet bool `long:"simnet" description:"Connect to the simulation test network"` SimNet bool `long:"simnet" description:"Connect to the simulation test network"`
TLSSkipVerify bool `long:"skipverify" description:"Do not verify tls certificates (not recommended!)"` TLSSkipVerify bool `long:"skipverify" description:"Do not verify tls certificates (not recommended!)"`
TestNet3 bool `long:"testnet" description:"Connect to testnet"`
ShowVersion bool `short:"V" long:"version" description:"Display version information and exit"`
Wallet bool `long:"wallet" description:"Connect to wallet"` Wallet bool `long:"wallet" description:"Connect to wallet"`
} }

View file

@ -37,11 +37,11 @@ var (
type config struct { type config struct {
DataDir string `short:"b" long:"datadir" description:"Location of the btcd data directory"` DataDir string `short:"b" long:"datadir" description:"Location of the btcd data directory"`
DbType string `long:"dbtype" description:"Database backend to use for the Block Chain"` DbType string `long:"dbtype" description:"Database backend to use for the Block Chain"`
TestNet3 bool `long:"testnet" description:"Use the test network"` UseGoOutput bool `short:"g" long:"gooutput" description:"Display the candidates using Go syntax that is ready to insert into the btcchain checkpoint list"`
NumCandidates int `short:"n" long:"numcandidates" description:"Max num of checkpoint candidates to show {1-20}"`
RegressionTest bool `long:"regtest" description:"Use the regression test network"` RegressionTest bool `long:"regtest" description:"Use the regression test network"`
SimNet bool `long:"simnet" description:"Use the simulation test network"` SimNet bool `long:"simnet" description:"Use the simulation test network"`
NumCandidates int `short:"n" long:"numcandidates" description:"Max num of checkpoint candidates to show {1-20}"` TestNet3 bool `long:"testnet" description:"Use the test network"`
UseGoOutput bool `short:"g" long:"gooutput" description:"Display the candidates using Go syntax that is ready to insert into the btcchain checkpoint list"`
} }
// validDbType returns whether or not dbType is a supported database type. // validDbType returns whether or not dbType is a supported database type.

View file

@ -18,10 +18,10 @@ import (
type config struct { type config struct {
Directory string `short:"d" long:"directory" description:"Directory to write certificate pair"` Directory string `short:"d" long:"directory" description:"Directory to write certificate pair"`
Years int `short:"y" long:"years" description:"How many years a certificate is valid for"`
Organization string `short:"o" long:"org" description:"Organization in certificate"`
ExtraHosts []string `short:"H" long:"host" description:"Additional hosts/IPs to create certificate for"`
Force bool `short:"f" long:"force" description:"Force overwriting of any old certs and keys"` Force bool `short:"f" long:"force" description:"Force overwriting of any old certs and keys"`
ExtraHosts []string `short:"H" long:"host" description:"Additional hosts/IPs to create certificate for"`
Organization string `short:"o" long:"org" description:"Organization in certificate"`
Years int `short:"y" long:"years" description:"How many years a certificate is valid for"`
} }
func main() { func main() {

126
config.go
View file

@ -93,79 +93,79 @@ func minUint32(a, b uint32) uint32 {
// //
// See loadConfig for details on the configuration load process. // See loadConfig for details on the configuration load process.
type config struct { type config struct {
ShowVersion bool `short:"V" long:"version" description:"Display version information and exit"` AddCheckpoints []string `long:"addcheckpoint" description:"Add a custom checkpoint. Format: '<height>:<hash>'"`
ConfigFile string `short:"C" long:"configfile" description:"Path to configuration file"`
DataDir string `short:"b" long:"datadir" description:"Directory to store data"`
LogDir string `long:"logdir" description:"Directory to log output."`
AddPeers []string `short:"a" long:"addpeer" description:"Add a peer to connect with at startup"` AddPeers []string `short:"a" long:"addpeer" description:"Add a peer to connect with at startup"`
ConnectPeers []string `long:"connect" description:"Connect only to the specified peers at startup"` AddrIndex bool `long:"addrindex" description:"Maintain a full address-based transaction index which makes the searchrawtransactions RPC available"`
DisableListen bool `long:"nolisten" description:"Disable listening for incoming connections -- NOTE: Listening is automatically disabled if the --connect or --proxy options are used without also specifying listen interfaces via --listen"` AgentBlacklist []string `long:"agentblacklist" description:"A comma separated list of user-agent substrings which will cause btcd to reject any peers whose user-agent contains any of the blacklisted substrings."`
Listeners []string `long:"listen" description:"Add an interface/port to listen for connections (default all interfaces port: 8333, testnet: 18333)"` AgentWhitelist []string `long:"agentwhitelist" description:"A comma separated list of user-agent substrings which will cause btcd to require all peers' user-agents to contain one of the whitelisted substrings. The blacklist is applied before the blacklist, and an empty whitelist will allow all agents that do not fail the blacklist."`"`
MaxPeers int `long:"maxpeers" description:"Max number of inbound and outbound peers"`
DisableBanning bool `long:"nobanning" description:"Disable banning of misbehaving peers"`
BanDuration time.Duration `long:"banduration" description:"How long to ban misbehaving peers. Valid time units are {s, m, h}. Minimum 1 second"` BanDuration time.Duration `long:"banduration" description:"How long to ban misbehaving peers. Valid time units are {s, m, h}. Minimum 1 second"`
BanThreshold uint32 `long:"banthreshold" description:"Maximum allowed ban score before disconnecting and banning misbehaving peers."` BanThreshold uint32 `long:"banthreshold" description:"Maximum allowed ban score before disconnecting and banning misbehaving peers."`
Whitelists []string `long:"whitelist" description:"Add an IP network or IP that will not be banned. (eg. 192.168.1.0/24 or ::1)"` BlockMaxSize uint32 `long:"blockmaxsize" description:"Maximum block size in bytes to be used when creating a block"`
AgentBlacklist []string `long:"agentblacklist" description:"A comma separated list of user-agent substrings which will cause btcd to reject any peers whose user-agent contains any of the blacklisted substrings."` BlockMinSize uint32 `long:"blockminsize" description:"Mininum block size in bytes to be used when creating a block"`
AgentWhitelist []string `long:"agentwhitelist" description:"A comma separated list of user-agent substrings which will cause btcd to require all peers' user-agents to contain one of the whitelisted substrings. The blacklist is applied before the blacklist, and an empty whitelist will allow all agents that do not fail the blacklist."` BlockMaxWeight uint32 `long:"blockmaxweight" description:"Maximum block weight to be used when creating a block"`
RPCUser string `short:"u" long:"rpcuser" description:"Username for RPC connections"` BlockMinWeight uint32 `long:"blockminweight" description:"Mininum block weight to be used when creating a block"`
RPCPass string `short:"P" long:"rpcpass" default-mask:"-" description:"Password for RPC connections"` BlockPrioritySize uint32 `long:"blockprioritysize" description:"Size in bytes for high-priority/low-fee transactions when creating a block"`
RPCLimitUser string `long:"rpclimituser" description:"Username for limited RPC connections"` BlocksOnly bool `long:"blocksonly" description:"Do not accept transactions from remote peers."`
RPCLimitPass string `long:"rpclimitpass" default-mask:"-" description:"Password for limited RPC connections"` ConfigFile string `short:"C" long:"configfile" description:"Path to configuration file"`
RPCListeners []string `long:"rpclisten" description:"Add an interface/port to listen for RPC connections (default port: 8334, testnet: 18334)"` ConnectPeers []string `long:"connect" description:"Connect only to the specified peers at startup"`
RPCCert string `long:"rpccert" description:"File containing the certificate file"` CPUProfile string `long:"cpuprofile" description:"Write CPU profile to the specified file"`
RPCKey string `long:"rpckey" description:"File containing the certificate key"` DataDir string `short:"b" long:"datadir" description:"Directory to store data"`
RPCMaxClients int `long:"rpcmaxclients" description:"Max number of RPC clients for standard connections"` DbType string `long:"dbtype" description:"Database backend to use for the Block Chain"`
RPCMaxWebsockets int `long:"rpcmaxwebsockets" description:"Max number of RPC websocket connections"` DebugLevel string `short:"d" long:"debuglevel" description:"Logging level for all subsystems {trace, debug, info, warn, error, critical} -- You may also specify <subsystem>=<level>,<subsystem2>=<level>,... to set the log level for individual subsystems -- Use show to list available subsystems"`
RPCMaxConcurrentReqs int `long:"rpcmaxconcurrentreqs" description:"Max number of concurrent RPC requests that may be processed concurrently"` DropAddrIndex bool `long:"dropaddrindex" description:"Deletes the address-based transaction index from the database on start up and then exits."`
RPCQuirks bool `long:"rpcquirks" description:"Mirror some JSON-RPC quirks of Bitcoin Core -- NOTE: Discouraged unless interoperability issues need to be worked around"` DropCfIndex bool `long:"dropcfindex" description:"Deletes the index used for committed filtering (CF) support from the database on start up and then exits."`
DropTxIndex bool `long:"droptxindex" description:"Deletes the hash-based transaction index from the database on start up and then exits."`
ExternalIPs []string `long:"externalip" description:"Add an ip to the list of local addresses we claim to listen on to peers"`
Generate bool `long:"generate" description:"Generate (mine) bitcoins using the CPU"`
FreeTxRelayLimit float64 `long:"limitfreerelay" description:"Limit relay of transactions with no transaction fee to the given amount in thousands of bytes per minute"`
Listeners []string `long:"listen" description:"Add an interface/port to listen for connections (default all interfaces port: 8333, testnet: 18333)"`
LogDir string `long:"logdir" description:"Directory to log output."`
MaxOrphanTxs int `long:"maxorphantx" description:"Max number of orphan transactions to keep in memory"`
MaxPeers int `long:"maxpeers" description:"Max number of inbound and outbound peers"`
MiningAddrs []string `long:"miningaddr" description:"Add the specified payment address to the list of addresses to use for generated blocks -- At least one address is required if the generate option is set"`
MinRelayTxFee float64 `long:"minrelaytxfee" description:"The minimum transaction fee in BTC/kB to be considered a non-zero fee."`
DisableBanning bool `long:"nobanning" description:"Disable banning of misbehaving peers"`
NoCFilters bool `long:"nocfilters" description:"Disable committed filtering (CF) support"`
DisableCheckpoints bool `long:"nocheckpoints" description:"Disable built-in checkpoints. Don't do this unless you know what you're doing."`
DisableDNSSeed bool `long:"nodnsseed" description:"Disable DNS seeding for peers"`
DisableListen bool `long:"nolisten" description:"Disable listening for incoming connections -- NOTE: Listening is automatically disabled if the --connect or --proxy options are used without also specifying listen interfaces via --listen"`
NoOnion bool `long:"noonion" description:"Disable connecting to tor hidden services"`
NoPeerBloomFilters bool `long:"nopeerbloomfilters" description:"Disable bloom filtering support"`
NoRelayPriority bool `long:"norelaypriority" description:"Do not require free or low-fee transactions to have high priority for relaying"`
DisableRPC bool `long:"norpc" description:"Disable built-in RPC server -- NOTE: The RPC server is disabled by default if no rpcuser/rpcpass or rpclimituser/rpclimitpass is specified"` DisableRPC bool `long:"norpc" description:"Disable built-in RPC server -- NOTE: The RPC server is disabled by default if no rpcuser/rpcpass or rpclimituser/rpclimitpass is specified"`
DisableTLS bool `long:"notls" description:"Disable TLS for the RPC server -- NOTE: This is only allowed if the RPC server is bound to localhost"` DisableTLS bool `long:"notls" description:"Disable TLS for the RPC server -- NOTE: This is only allowed if the RPC server is bound to localhost"`
DisableDNSSeed bool `long:"nodnsseed" description:"Disable DNS seeding for peers"`
ExternalIPs []string `long:"externalip" description:"Add an ip to the list of local addresses we claim to listen on to peers"`
Proxy string `long:"proxy" description:"Connect via SOCKS5 proxy (eg. 127.0.0.1:9050)"`
ProxyUser string `long:"proxyuser" description:"Username for proxy server"`
ProxyPass string `long:"proxypass" default-mask:"-" description:"Password for proxy server"`
OnionProxy string `long:"onion" description:"Connect to tor hidden services via SOCKS5 proxy (eg. 127.0.0.1:9050)"` OnionProxy string `long:"onion" description:"Connect to tor hidden services via SOCKS5 proxy (eg. 127.0.0.1:9050)"`
OnionProxyUser string `long:"onionuser" description:"Username for onion proxy server"`
OnionProxyPass string `long:"onionpass" default-mask:"-" description:"Password for onion proxy server"` OnionProxyPass string `long:"onionpass" default-mask:"-" description:"Password for onion proxy server"`
NoOnion bool `long:"noonion" description:"Disable connecting to tor hidden services"` OnionProxyUser string `long:"onionuser" description:"Username for onion proxy server"`
TorIsolation bool `long:"torisolation" description:"Enable Tor stream isolation by randomizing user credentials for each connection."`
TestNet3 bool `long:"testnet" description:"Use the test network"`
RegressionTest bool `long:"regtest" description:"Use the regression test network"`
SimNet bool `long:"simnet" description:"Use the simulation test network"`
AddCheckpoints []string `long:"addcheckpoint" description:"Add a custom checkpoint. Format: '<height>:<hash>'"`
DisableCheckpoints bool `long:"nocheckpoints" description:"Disable built-in checkpoints. Don't do this unless you know what you're doing."`
DbType string `long:"dbtype" description:"Database backend to use for the Block Chain"`
Profile string `long:"profile" description:"Enable HTTP profiling on given port -- NOTE port must be between 1024 and 65536"` Profile string `long:"profile" description:"Enable HTTP profiling on given port -- NOTE port must be between 1024 and 65536"`
CPUProfile string `long:"cpuprofile" description:"Write CPU profile to the specified file"` Proxy string `long:"proxy" description:"Connect via SOCKS5 proxy (eg. 127.0.0.1:9050)"`
DebugLevel string `short:"d" long:"debuglevel" description:"Logging level for all subsystems {trace, debug, info, warn, error, critical} -- You may also specify <subsystem>=<level>,<subsystem2>=<level>,... to set the log level for individual subsystems -- Use show to list available subsystems"` ProxyPass string `long:"proxypass" default-mask:"-" description:"Password for proxy server"`
Upnp bool `long:"upnp" description:"Use UPnP to map our listening port outside of NAT"` ProxyUser string `long:"proxyuser" description:"Username for proxy server"`
MinRelayTxFee float64 `long:"minrelaytxfee" description:"The minimum transaction fee in BTC/kB to be considered a non-zero fee."` RegressionTest bool `long:"regtest" description:"Use the regression test network"`
FreeTxRelayLimit float64 `long:"limitfreerelay" description:"Limit relay of transactions with no transaction fee to the given amount in thousands of bytes per minute"`
NoRelayPriority bool `long:"norelaypriority" description:"Do not require free or low-fee transactions to have high priority for relaying"`
TrickleInterval time.Duration `long:"trickleinterval" description:"Minimum time between attempts to send new inventory to a connected peer"`
MaxOrphanTxs int `long:"maxorphantx" description:"Max number of orphan transactions to keep in memory"`
Generate bool `long:"generate" description:"Generate (mine) bitcoins using the CPU"`
MiningAddrs []string `long:"miningaddr" description:"Add the specified payment address to the list of addresses to use for generated blocks -- At least one address is required if the generate option is set"`
BlockMinSize uint32 `long:"blockminsize" description:"Mininum block size in bytes to be used when creating a block"`
BlockMaxSize uint32 `long:"blockmaxsize" description:"Maximum block size in bytes to be used when creating a block"`
BlockMinWeight uint32 `long:"blockminweight" description:"Mininum block weight to be used when creating a block"`
BlockMaxWeight uint32 `long:"blockmaxweight" description:"Maximum block weight to be used when creating a block"`
BlockPrioritySize uint32 `long:"blockprioritysize" description:"Size in bytes for high-priority/low-fee transactions when creating a block"`
UserAgentComments []string `long:"uacomment" description:"Comment to add to the user agent -- See BIP 14 for more information."`
NoPeerBloomFilters bool `long:"nopeerbloomfilters" description:"Disable bloom filtering support"`
NoCFilters bool `long:"nocfilters" description:"Disable committed filtering (CF) support"`
DropCfIndex bool `long:"dropcfindex" description:"Deletes the index used for committed filtering (CF) support from the database on start up and then exits."`
SigCacheMaxSize uint `long:"sigcachemaxsize" description:"The maximum number of entries in the signature verification cache"`
BlocksOnly bool `long:"blocksonly" description:"Do not accept transactions from remote peers."`
TxIndex bool `long:"txindex" description:"Maintain a full hash-based transaction index which makes all transactions available via the getrawtransaction RPC"`
DropTxIndex bool `long:"droptxindex" description:"Deletes the hash-based transaction index from the database on start up and then exits."`
AddrIndex bool `long:"addrindex" description:"Maintain a full address-based transaction index which makes the searchrawtransactions RPC available"`
DropAddrIndex bool `long:"dropaddrindex" description:"Deletes the address-based transaction index from the database on start up and then exits."`
RelayNonStd bool `long:"relaynonstd" description:"Relay non-standard transactions regardless of the default settings for the active network."`
RejectNonStd bool `long:"rejectnonstd" description:"Reject non-standard transactions regardless of the default settings for the active network."` RejectNonStd bool `long:"rejectnonstd" description:"Reject non-standard transactions regardless of the default settings for the active network."`
RejectReplacement bool `long:"rejectreplacement" description:"Reject transactions that attempt to replace existing transactions within the mempool through the Replace-By-Fee (RBF) signaling policy."` RejectReplacement bool `long:"rejectreplacement" description:"Reject transactions that attempt to replace existing transactions within the mempool through the Replace-By-Fee (RBF) signaling policy."`
RelayNonStd bool `long:"relaynonstd" description:"Relay non-standard transactions regardless of the default settings for the active network."`
RPCCert string `long:"rpccert" description:"File containing the certificate file"`
RPCKey string `long:"rpckey" description:"File containing the certificate key"`
RPCLimitPass string `long:"rpclimitpass" default-mask:"-" description:"Password for limited RPC connections"`
RPCLimitUser string `long:"rpclimituser" description:"Username for limited RPC connections"`
RPCListeners []string `long:"rpclisten" description:"Add an interface/port to listen for RPC connections (default port: 8334, testnet: 18334)"`
RPCMaxClients int `long:"rpcmaxclients" description:"Max number of RPC clients for standard connections"`
RPCMaxConcurrentReqs int `long:"rpcmaxconcurrentreqs" description:"Max number of concurrent RPC requests that may be processed concurrently"`
RPCMaxWebsockets int `long:"rpcmaxwebsockets" description:"Max number of RPC websocket connections"`
RPCQuirks bool `long:"rpcquirks" description:"Mirror some JSON-RPC quirks of Bitcoin Core -- NOTE: Discouraged unless interoperability issues need to be worked around"`
RPCPass string `short:"P" long:"rpcpass" default-mask:"-" description:"Password for RPC connections"`
RPCUser string `short:"u" long:"rpcuser" description:"Username for RPC connections"`
SigCacheMaxSize uint `long:"sigcachemaxsize" description:"The maximum number of entries in the signature verification cache"`
SimNet bool `long:"simnet" description:"Use the simulation test network"`
TestNet3 bool `long:"testnet" description:"Use the test network"`
TorIsolation bool `long:"torisolation" description:"Enable Tor stream isolation by randomizing user credentials for each connection."`
TrickleInterval time.Duration `long:"trickleinterval" description:"Minimum time between attempts to send new inventory to a connected peer"`
TxIndex bool `long:"txindex" description:"Maintain a full hash-based transaction index which makes all transactions available via the getrawtransaction RPC"`
UserAgentComments []string `long:"uacomment" description:"Comment to add to the user agent -- See BIP 14 for more information."`
Upnp bool `long:"upnp" description:"Use UPnP to map our listening port outside of NAT"`
ShowVersion bool `short:"V" long:"version" description:"Display version information and exit"`
Whitelists []string `long:"whitelist" description:"Add an IP network or IP that will not be banned. (eg. 192.168.1.0/24 or ::1)"`
lookup func(string) ([]net.IP, error) lookup func(string) ([]net.IP, error)
oniondial func(string, string, time.Duration) (net.Conn, error) oniondial func(string, string, time.Duration) (net.Conn, error)
dial func(string, string, time.Duration) (net.Conn, error) dial func(string, string, time.Duration) (net.Conn, error)

View file

@ -33,9 +33,9 @@ var (
type config struct { type config struct {
DataDir string `short:"b" long:"datadir" description:"Location of the btcd data directory"` DataDir string `short:"b" long:"datadir" description:"Location of the btcd data directory"`
DbType string `long:"dbtype" description:"Database backend to use for the Block Chain"` DbType string `long:"dbtype" description:"Database backend to use for the Block Chain"`
TestNet3 bool `long:"testnet" description:"Use the test network"`
RegressionTest bool `long:"regtest" description:"Use the regression test network"` RegressionTest bool `long:"regtest" description:"Use the regression test network"`
SimNet bool `long:"simnet" description:"Use the simulation test network"` SimNet bool `long:"simnet" description:"Use the simulation test network"`
TestNet3 bool `long:"testnet" description:"Use the test network"`
} }
// fileExists reports whether the named file or directory exists. // fileExists reports whether the named file or directory exists.

230
doc.go
View file

@ -21,105 +21,137 @@ Usage:
btcd [OPTIONS] btcd [OPTIONS]
Application Options: Application Options:
-V, --version Display version information and exit --addcheckpoint= Add a custom checkpoint. Format:
-C, --configfile= Path to configuration file '<height>:<hash>'
-b, --datadir= Directory to store data -a, --addpeer= Add a peer to connect with at startup
--logdir= Directory to log output. --addrindex Maintain a full address-based transaction index
-a, --addpeer= Add a peer to connect with at startup which makes the searchrawtransactions RPC
--connect= Connect only to the specified peers at startup available
--nolisten Disable listening for incoming connections -- NOTE: --banduration= How long to ban misbehaving peers. Valid time
Listening is automatically disabled if the --connect units are {s, m, h}. Minimum 1 second (default:
or --proxy options are used without also specifying 24h0m0s)
listen interfaces via --listen --banthreshold= Maximum allowed ban score before disconnecting
--listen= Add an interface/port to listen for connections and banning misbehaving peers. (default: 100)
(default all interfaces port: 8333, testnet: 18333) --blockmaxsize= Maximum block size in bytes to be used when
--maxpeers= Max number of inbound and outbound peers (125) creating a block (default: 750000)
--nobanning Disable banning of misbehaving peers --blockminsize= Mininum block size in bytes to be used when
--banduration= How long to ban misbehaving peers. Valid time units creating a block
are {s, m, h}. Minimum 1 second (24h0m0s) --blockmaxweight= Maximum block weight to be used when creating a
--banthreshold= Maximum allowed ban score before disconnecting and block (default: 3000000)
banning misbehaving peers. --blockminweight= Mininum block weight to be used when creating a
--whitelist= Add an IP network or IP that will not be banned. block
(eg. 192.168.1.0/24 or ::1) --blockprioritysize= Size in bytes for high-priority/low-fee
-u, --rpcuser= Username for RPC connections transactions when creating a block (default:
-P, --rpcpass= Password for RPC connections 50000)
--rpclimituser= Username for limited RPC connections --blocksonly Do not accept transactions from remote peers.
--rpclimitpass= Password for limited RPC connections -C, --configfile= Path to configuration file
--rpclisten= Add an interface/port to listen for RPC connections --connect= Connect only to the specified peers at startup
(default port: 8334, testnet: 18334) --cpuprofile= Write CPU profile to the specified file
--rpccert= File containing the certificate file -b, --datadir= Directory to store data
--rpckey= File containing the certificate key --dbtype= Database backend to use for the Block Chain
--rpcmaxclients= Max number of RPC clients for standard connections (default: ffldb)
(10) -d, --debuglevel= Logging level for all subsystems {trace, debug,
--rpcmaxwebsockets= Max number of RPC websocket connections (25) info, warn, error, critical} -- You may also
--rpcquirks Mirror some JSON-RPC quirks of Bitcoin Core -- NOTE: specify
Discouraged unless interoperability issues need to <subsystem>=<level>,<subsystem2>=<level>,... to
be worked around set the log level for individual subsystems --
--norpc Disable built-in RPC server -- NOTE: The RPC server Use show to list available subsystems (default:
is disabled by default if no rpcuser/rpcpass or info)
rpclimituser/rpclimitpass is specified --dropaddrindex Deletes the address-based transaction index from
--notls Disable TLS for the RPC server -- NOTE: This is only the database on start up and then exits.
allowed if the RPC server is bound to localhost --dropcfindex Deletes the index used for committed filtering
--nodnsseed Disable DNS seeding for peers (CF) support from the database on start up and
--externalip= Add an ip to the list of local addresses we claim to then exits.
listen on to peers --droptxindex Deletes the hash-based transaction index from the
--proxy= Connect via SOCKS5 proxy (eg. 127.0.0.1:9050) database on start up and then exits.
--proxyuser= Username for proxy server --externalip= Add an ip to the list of local addresses we claim
--proxypass= Password for proxy server to listen on to peers
--onion= Connect to tor hidden services via SOCKS5 proxy --generate Generate (mine) bitcoins using the CPU
(eg. 127.0.0.1:9050) --limitfreerelay= Limit relay of transactions with no transaction
--onionuser= Username for onion proxy server fee to the given amount in thousands of bytes per
--onionpass= Password for onion proxy server minute (default: 15)
--noonion Disable connecting to tor hidden services --listen= Add an interface/port to listen for connections
--torisolation Enable Tor stream isolation by randomizing user (default all interfaces port: 8333, testnet:
credentials for each connection. 18333)
--testnet Use the test network --logdir= Directory to log output
--regtest Use the regression test network --maxorphantx= Max number of orphan transactions to keep in
--simnet Use the simulation test network memory (default: 100)
--addcheckpoint= Add a custom checkpoint. Format: '<height>:<hash>' --maxpeers= Max number of inbound and outbound peers
--nocheckpoints Disable built-in checkpoints. Don't do this unless (default: 125)
you know what you're doing. --miningaddr= Add the specified payment address to the list of
--uacomment= Comment to add to the user agent -- addresses to use for generated blocks -- At least
See BIP 14 for more information. one address is required if the generate option is
--dbtype= Database backend to use for the Block Chain (ffldb) set
--profile= Enable HTTP profiling on given port -- NOTE port --minrelaytxfee= The minimum transaction fee in BTC/kB to be
must be between 1024 and 65536 considered a non-zero fee. (default: 1e-05)
--cpuprofile= Write CPU profile to the specified file --nobanning Disable banning of misbehaving peers
-d, --debuglevel= Logging level for all subsystems {trace, debug, --nocfilters Disable committed filtering (CF) support
info, warn, error, critical} -- You may also specify --nocheckpoints Disable built-in checkpoints. Don't do this
<subsystem>=<level>,<subsystem2>=<level>,... to set unless you know what you're doing.
the log level for individual subsystems -- Use show --nodnsseed Disable DNS seeding for peers
to list available subsystems (info) --nolisten Disable listening for incoming connections --
--upnp Use UPnP to map our listening port outside of NAT NOTE: Listening is automatically disabled if the
--minrelaytxfee= The minimum transaction fee in BTC/kB to be --connect or --proxy options are used without
considered a non-zero fee. also specifying listen interfaces via --listen
--limitfreerelay= Limit relay of transactions with no transaction fee --noonion Disable connecting to tor hidden services
to the given amount in thousands of bytes per --nopeerbloomfilters Disable bloom filtering support
minute (15) --norelaypriority Do not require free or low-fee transactions to
--norelaypriority Do not require free or low-fee transactions to have have high priority for relaying
high priority for relaying --norpc Disable built-in RPC server -- NOTE: The RPC
--maxorphantx= Max number of orphan transactions to keep in memory server is disabled by default if no
(100) rpcuser/rpcpass or rpclimituser/rpclimitpass is
--generate Generate (mine) bitcoins using the CPU specified
--miningaddr= Add the specified payment address to the list of --notls Disable TLS for the RPC server -- NOTE: This is
addresses to use for generated blocks -- At least only allowed if the RPC server is bound to
one address is required if the generate option is localhost
set --onion= Connect to tor hidden services via SOCKS5 proxy
--blockminsize= Mininum block size in bytes to be used when creating (eg. 127.0.0.1:9050)
a block --onionpass= Password for onion proxy server
--blockmaxsize= Maximum block size in bytes to be used when creating --onionuser= Username for onion proxy server
a block (750000) --profile= Enable HTTP profiling on given port -- NOTE port
--blockprioritysize= Size in bytes for high-priority/low-fee transactions must be between 1024 and 65536
when creating a block (50000) --proxy= Connect via SOCKS5 proxy (eg. 127.0.0.1:9050)
--nopeerbloomfilters Disable bloom filtering support. --proxypass= Password for proxy server
--nocfilters Disable committed filtering (CF) support. --proxyuser= Username for proxy server
--sigcachemaxsize= The maximum number of entries in the signature --regtest Use the regression test network
verification cache. --rejectnonstd Reject non-standard transactions regardless of
--blocksonly Do not accept transactions from remote peers. the default settings for the active network.
--relaynonstd Relay non-standard transactions regardless of the --relaynonstd Relay non-standard transactions regardless of the
default settings for the active network. default settings for the active network.
--rejectnonstd Reject non-standard transactions regardless of the --rpccert= File containing the certificate file
default settings for the active network. --rpckey= File containing the certificate key
--rpclimitpass= Password for limited RPC connections
--rpclimituser= Username for limited RPC connections
--rpclisten= Add an interface/port to listen for RPC
connections (default port: 8334, testnet: 18334)
--rpcmaxclients= Max number of RPC clients for standard
connections (default: 10)
--rpcmaxconcurrentreqs= Max number of concurrent RPC requests that may be
processed concurrently (default: 20)
--rpcmaxwebsockets= Max number of RPC websocket connections (default:
25)
--rpcquirks Mirror some JSON-RPC quirks of Bitcoin Core --
NOTE: Discouraged unless interoperability issues
need to be worked around
-P, --rpcpass= Password for RPC connections
-u, --rpcuser= Username for RPC connections
--sigcachemaxsize= The maximum number of entries in the signature
verification cache (default: 100000)
--simnet Use the simulation test network
--testnet Use the test network
--torisolation Enable Tor stream isolation by randomizing user
credentials for each connection.
--trickleinterval= Minimum time between attempts to send new
inventory to a connected peer (default: 10s)
--txindex Maintain a full hash-based transaction index
which makes all transactions available via the
getrawtransaction RPC
--uacomment= Comment to add to the user agent -- See BIP 14
for more information.
--upnp Use UPnP to map our listening port outside of NAT
-V, --version Display version information and exit
--whitelist= Add an IP network or IP that will not be banned.
(eg. 192.168.1.0/24 or ::1)
Help Options: Help Options:
-h, --help Show this help message -h, --help Show this help message