This updates the sampleconfig package to make use of Go's embed functionality introduced in Go 1.16 which is acceptable since the containing module requires Go 1.19. Embedded files are preferable because they bring the benefits of both external files in the repository that are easier to work with for external tools and the ability to access their content programmatically without having to deal with the various issues typically brought about by programmatically accessing external files. Also, when this was last updated to change the exported variable for dcrd's sample config file over to a function (so it can't be mutated and the implementation details can be changed if needed), the case for dcrctl was missed. Moreover, the existence of both configs makes the func name FileContents ambiguous. Unfortunately, those things can't be changed now without causing a major module version bump to the main dcrd module which we really want to avoid. So, in order to address those things without needing a major module version bump, this deprecates the FileContents func and DcrctlSampleConfig variable and introduces two new functions named Dcrd and Dcrctl that return the respective embedded sample configs.
40 lines
1.0 KiB
Plaintext
40 lines
1.0 KiB
Plaintext
[Application Options]
|
|
|
|
; ------------------------------------------------------------------------------
|
|
; Network settings
|
|
; ------------------------------------------------------------------------------
|
|
|
|
; Use testnet (cannot be used with simnet=1).
|
|
; testnet=1
|
|
|
|
; Use simnet (cannot be used with testnet=1).
|
|
; simnet=1
|
|
|
|
; The duration of inactivity before a peer is timed out.
|
|
; Valid time units are {s,m,h}. Minimum 15 seconds.
|
|
; peeridletimeout=120s
|
|
|
|
|
|
; ------------------------------------------------------------------------------
|
|
; RPC client settings
|
|
; ------------------------------------------------------------------------------
|
|
|
|
; Connect via a SOCKS5 proxy.
|
|
; proxy=127.0.0.1:9050
|
|
; proxyuser=
|
|
; proxypass=
|
|
|
|
; Username and password to authenticate connections to a Decred RPC server
|
|
; (usually dcrd or dcrwallet)
|
|
; rpcuser=
|
|
; rpcpass=
|
|
|
|
; RPC server to connect to
|
|
; rpcserver=localhost
|
|
|
|
; Wallet RPC server to connect to
|
|
; walletrpcserver=localhost
|
|
|
|
; RPC server certificate chain file for validation
|
|
; rpccert=~/.dcrd/rpc.cert
|