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

Commit 638db72

Browse files
Enable profiling for lnd.
1 parent 7987657 commit 638db72

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

public/electron.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const {
1313
LND_PORT,
1414
LND_PEER_PORT,
1515
LND_REST_PORT,
16+
LND_PROFILING_PORT,
1617
LND_INIT_DELAY,
1718
BTCD_MINING_ADDRESS,
1819
} = require('../src/config');
@@ -142,6 +143,7 @@ const startLnd = async () => {
142143
lndPort: LND_PORT,
143144
lndPeerPort: LND_PEER_PORT,
144145
lndRestPort: LND_REST_PORT,
146+
lndProfilingPort: LND_PROFILING_PORT,
145147
logger: Logger,
146148
lndArgs,
147149
});

public/lnd-child-process.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ module.exports.startLndProcess = async function({
5252
lndPeerPort,
5353
logger,
5454
lndRestPort,
55+
lndProfilingPort,
5556
lndArgs = [],
5657
}) {
5758
if (!lndSettingsDir) throw new Error('lndSettingsDir not set!');
@@ -64,6 +65,7 @@ module.exports.startLndProcess = async function({
6465
lndPort ? `--rpclisten=localhost:${lndPort}` : '',
6566
lndPeerPort ? `--listen=localhost:${lndPeerPort}` : '',
6667
lndRestPort ? `--restlisten=localhost:${lndRestPort}` : '',
68+
lndProfilingPort ? `--profile=${lndProfilingPort}` : '',
6769
];
6870
// set development or production settings
6971
if (isDev) {

src/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module.exports.RATE_DELAY = 15 * 60 * 1000;
1010
module.exports.LND_PORT = 10006;
1111
module.exports.LND_PEER_PORT = 10016;
1212
module.exports.LND_REST_PORT = 8086;
13+
module.exports.LND_PROFILING_PORT = 9096;
1314

1415
module.exports.NETWORK = 'testnet';
1516
module.exports.BTCD_MINING_ADDRESS = 'rfu4i1Mo2NF7TQsN9bMVLFSojSzcyQCEH5';

0 commit comments

Comments
 (0)