Skip to content
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

Merged
merged 3 commits into from
May 2, 2019
Merged

Add a config file #6

merged 3 commits into from
May 2, 2019

Conversation

jholdstock
Copy link
Member

Rebased on top of #5

Copy link
Member

@matheusd matheusd left a 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"`
Copy link
Member

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"
Copy link
Member

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,
Copy link
Member

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"
Copy link
Member

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.


; network is the network the faucet is running on. This value must
; either be "litecoin" or "bitcoin".
network=decred
Copy link
Member

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.

@matheusd matheusd merged commit 5d277a1 into decred:master May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants