Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 7987657

Browse files
authored
Merge pull request #635 from lightninglabs/change-ports
Use different ports for lnd/grpc in case user already running lnd
2 parents 3443585 + cf29289 commit 7987657

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

assets/script/setup_local_cluster.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ After initiating the wallet and setting your password close the app again.
1111
```
1212
btcd --txindex --simnet --rpcuser=kek --rpcpass=kek --datadir=data/btcd/data --logdir=data/btcd/logs
1313
14-
lnd --rpclisten=localhost:10009 --listen=localhost:10019 --restlisten=localhost:8009 --lnddir=data/lnd --debuglevel=info --bitcoin.simnet --bitcoin.active --bitcoin.node=btcd --btcd.rpcuser=kek --btcd.rpcpass=kek
14+
lnd --rpclisten=localhost:10006 --listen=localhost:10016 --restlisten=localhost:8086 --lnddir=data/lnd --debuglevel=info --bitcoin.simnet --bitcoin.active --bitcoin.node=btcd --btcd.rpcuser=kek --btcd.rpcpass=kek
1515
16-
lncli --network=simnet --rpcserver=localhost:10009 --lnddir=data/lnd unlock
16+
lncli --network=simnet --rpcserver=localhost:10006 --lnddir=data/lnd unlock
1717
1818
lnd --rpclisten=localhost:10002 --listen=localhost:10012 --restlisten=localhost:8002 --lnddir=data/lnd2 --debuglevel=info --bitcoin.simnet --bitcoin.active --bitcoin.node=btcd --btcd.rpcuser=kek --btcd.rpcpass=kek --noencryptwallet
1919
```
2020

2121
## Fund wallets addresses
2222

2323
```
24-
lncli --network=simnet --rpcserver=localhost:10009 --lnddir=data/lnd newaddress np2wkh
24+
lncli --network=simnet --rpcserver=localhost:10006 --lnddir=data/lnd newaddress np2wkh
2525
2626
lncli --network=simnet --rpcserver=localhost:10002 --lnddir=data/lnd2 newaddress np2wkh
2727
@@ -33,19 +33,19 @@ btcctl --simnet --rpcuser=kek --rpcpass=kek generate 400
3333
## Open channel and send payment
3434

3535
```
36-
lncli --network=simnet --rpcserver=localhost:10009 --lnddir=data/lnd getinfo
36+
lncli --network=simnet --rpcserver=localhost:10006 --lnddir=data/lnd getinfo
3737
3838
lncli --network=simnet --rpcserver=localhost:10002 --lnddir=data/lnd2 getinfo
3939
40-
lncli --network=simnet --rpcserver=localhost:10009 --lnddir=data/lnd connect PUB_KEY@localhost:10012
40+
lncli --network=simnet --rpcserver=localhost:10006 --lnddir=data/lnd connect PUB_KEY@localhost:10012
4141
42-
lncli --network=simnet --rpcserver=localhost:10009 --lnddir=data/lnd openchannel --node_key=PUB_KEY --local_amt=16000000
42+
lncli --network=simnet --rpcserver=localhost:10006 --lnddir=data/lnd openchannel --node_key=PUB_KEY --local_amt=16000000
4343
4444
btcctl --simnet --rpcuser=kek --rpcpass=kek generate 6
4545
46-
lncli --network=simnet --rpcserver=localhost:10009 --lnddir=data/lnd listchannels
46+
lncli --network=simnet --rpcserver=localhost:10006 --lnddir=data/lnd listchannels
4747
4848
lncli --network=simnet --rpcserver=localhost:10002 --lnddir=data/lnd2 addinvoice --amt=10000
4949
50-
lncli --network=simnet --rpcserver=localhost:10009 --lnddir=data/lnd sendpayment --pay_req=ENCODED_INVOICE
50+
lncli --network=simnet --rpcserver=localhost:10006 --lnddir=data/lnd sendpayment --pay_req=ENCODED_INVOICE
5151
```

public/electron.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const {
1212
NETWORK,
1313
LND_PORT,
1414
LND_PEER_PORT,
15+
LND_REST_PORT,
1516
LND_INIT_DELAY,
1617
BTCD_MINING_ADDRESS,
1718
} = require('../src/config');
@@ -140,6 +141,7 @@ const startLnd = async () => {
140141
lndSettingsDir,
141142
lndPort: LND_PORT,
142143
lndPeerPort: LND_PEER_PORT,
144+
lndRestPort: LND_REST_PORT,
143145
logger: Logger,
144146
lndArgs,
145147
});

src/config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ module.exports.LND_INIT_DELAY = 5000;
77
module.exports.NOTIFICATION_DELAY = 5000;
88
module.exports.RATE_DELAY = 15 * 60 * 1000;
99

10-
module.exports.LND_PORT = 10009;
11-
module.exports.LND_PEER_PORT = 10019;
10+
module.exports.LND_PORT = 10006;
11+
module.exports.LND_PEER_PORT = 10016;
12+
module.exports.LND_REST_PORT = 8086;
13+
1214
module.exports.NETWORK = 'testnet';
1315
module.exports.BTCD_MINING_ADDRESS = 'rfu4i1Mo2NF7TQsN9bMVLFSojSzcyQCEH5';
1416

0 commit comments

Comments
 (0)