-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a config file #6
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one needs a rebase and a few tweaks.
config.go
Outdated
type config struct { | ||
LndIP string `long:"lnd_ip" description:"the public IP address of the faucet's node"` | ||
NetParams string `long:"net" description:"decred network to operate on"` | ||
LndNodes string `long:"nodes" description:"comma separated list of host:port"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not true that we support multiple nodes via a comma separated list. Only a single node is connected to, and I'm not sure it's even worth adding multi-node support given we already have 3 independent faucets running...
config.go
Outdated
"path/filepath" | ||
"strings" | ||
|
||
"github.com/btcsuite/go-flags" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should change this to "github.com/jessevdk/go-flags" to be consistent with other tools.
config.go
Outdated
func loadConfig() (*config, []string, error) { | ||
// Default config. | ||
cfg := config{ | ||
LndIP: defaultLndIP, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't being used anywhere, so I believe it's safe to remove. We're using the address returned by the NodeInfo call to the node, which is more reliable anyway.
config.go
Outdated
defaultBindAddr = ":80" | ||
defaultUseLeHTTPS = false | ||
defaultWipeChannels = false | ||
defaultDomain = "faucet.lightning.community" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably better to not specify a default for the domain and check whether it is specified when -use_le_https
is used.
sample-dcrlnfaucet.conf
Outdated
|
||
; network is the network the faucet is running on. This value must | ||
; either be "litecoin" or "bitcoin". | ||
network=decred |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary, since this is decred only and our UI is for tailored for dcr.
Rebased on top of #5