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 port number to node URI #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Once you have the faucet installed, you'll need to ensure you have a local
Once the node is synced, execute the following command (from this directory) to
deploy the faucet:
```
lightning-faucet --lnd_ip=X.X.X.X
lightning-faucet --lnd_ip=X.X.X.X --lnd_port=9735
```

Where `X.X.X.X` is the public, reachable IP address for your active `lnd` node.
Expand Down
2 changes: 1 addition & 1 deletion faucet.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ func (l *lightningFaucet) fetchHomeState() (*homePageContext, error) {
return nil, err
}

nodeAddr := fmt.Sprintf("%v@%v", nodeInfo.IdentityPubkey, *lndIP)
nodeAddr := fmt.Sprintf("%v@%v:%v", nodeInfo.IdentityPubkey, *lndIP, *lndPort)
return &homePageContext{
NumCoins: btcutil.Amount(walletBalance.Balance).ToBTC(),
NumChannels: nodeInfo.NumActiveChannels,
Expand Down
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ var (
lndIP = flag.String("lnd_ip", "10.0.0.9", "the public IP address of "+
"the faucet's node")

// lndPort is the port listening for P2P connections.
lndPort = flag.String("lnd_port", "9735", "port to listen for P2P")

// port is the port that the http server should listen on.
port = flag.String("port", "8080", "port to list for http")
port = flag.String("port", "8080", "port to listen for HTTP")

// wipeChannels is a bool that indicates if all channels should be
// closed (either cooperatively or forcibly) on startup. If all
Expand Down