ln-docker-daemons 2.1.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +2 -0
- package/cluster/spawn_lightning_cluster.js +2 -0
- package/lnd/spawn_lightning_docker.js +2 -0
- package/lnd/spawn_lnd_docker.js +26 -23
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -69,6 +69,7 @@ await kill({});
|
|
|
69
69
|
Spawn a cluster of nodes
|
|
70
70
|
|
|
71
71
|
{
|
|
72
|
+
[lnd_configuration]: [<LND Configuration Argument String>]
|
|
72
73
|
[size]: <Total Lightning Nodes Number>
|
|
73
74
|
}
|
|
74
75
|
|
|
@@ -114,6 +115,7 @@ Spawn an LND Docker
|
|
|
114
115
|
generate_address: <Generate Blocks to Address String>
|
|
115
116
|
lightning_p2p_port: <Lightning Network P2P Listen Port Number>
|
|
116
117
|
lightning_rpc_port: <Lightning Node RPC Port Number>
|
|
118
|
+
[lnd_configuration]: [<LND Configuration Argument String>]
|
|
117
119
|
}
|
|
118
120
|
|
|
119
121
|
@returns via cbk or Promise
|
|
@@ -27,6 +27,7 @@ const times = 3000;
|
|
|
27
27
|
/** Spawn a cluster of nodes
|
|
28
28
|
|
|
29
29
|
{
|
|
30
|
+
[lnd_configuration]: [<LND Configuration Argument String>]
|
|
30
31
|
[size]: <Total Lightning Nodes Number>
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -75,6 +76,7 @@ module.exports = (args, cbk) => {
|
|
|
75
76
|
generate_address: generateAddress,
|
|
76
77
|
lightning_p2p_port: lightningP2pPort,
|
|
77
78
|
lightning_rpc_port: lightningRpcPort,
|
|
79
|
+
lnd_configuration: args.lnd_configuration,
|
|
78
80
|
});
|
|
79
81
|
|
|
80
82
|
const {lnd} = authenticatedLndGrpc({
|
|
@@ -18,6 +18,7 @@ const spawnLndDocker = require('./spawn_lnd_docker');
|
|
|
18
18
|
generate_address: <Generate Blocks to Address String>
|
|
19
19
|
lightning_p2p_port: <Lightning Network P2P Listen Port Number>
|
|
20
20
|
lightning_rpc_port: <Lightning Node RPC Port Number>
|
|
21
|
+
[lnd_configuration]: [<LND Configuration Argument String>]
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
@returns via cbk or Promise
|
|
@@ -99,6 +100,7 @@ module.exports = (args, cbk) => {
|
|
|
99
100
|
({spawnChainDaemon}, cbk) =>
|
|
100
101
|
{
|
|
101
102
|
return spawnLndDocker({
|
|
103
|
+
configuration: args.lnd_configuration,
|
|
102
104
|
bitcoind_rpc_host: spawnChainDaemon.host,
|
|
103
105
|
bitcoind_rpc_pass: spawnChainDaemon.rpc_pass,
|
|
104
106
|
bitcoind_rpc_port: args.chain_rpc_port,
|
package/lnd/spawn_lnd_docker.js
CHANGED
|
@@ -23,6 +23,7 @@ const tlsCertPath = '/root/.lnd/tls.cert';
|
|
|
23
23
|
bitcoind_rpc_user: <Bitcoin Core RPC Username String>
|
|
24
24
|
bitcoind_zmq_block_port: <Bitcoin Core ZMQ Block Port Number>
|
|
25
25
|
bitcoind_zmq_tx_port: <Bitcoin Core ZMQ Transaction Port Number>
|
|
26
|
+
[configuration]: [<LND Configuration Argument String>]
|
|
26
27
|
p2p_port: <LND Peer to Peer Listen Port Number>
|
|
27
28
|
rpc_port: <LND RPC Port Number>
|
|
28
29
|
}
|
|
@@ -78,30 +79,32 @@ module.exports = (args, cbk) => {
|
|
|
78
79
|
const zmqBlockPort = args.bitcoind_zmq_block_port;
|
|
79
80
|
const zmqTxPort = args.bitcoind_zmq_tx_port;
|
|
80
81
|
|
|
82
|
+
const arguments = [
|
|
83
|
+
'--accept-keysend',
|
|
84
|
+
'--allow-circular-route',
|
|
85
|
+
'--autopilot.heuristic=externalscore:0.5',
|
|
86
|
+
'--autopilot.heuristic=preferential:0.5',
|
|
87
|
+
'--bitcoin.active',
|
|
88
|
+
'--bitcoin.minhtlc=1000',
|
|
89
|
+
'--bitcoin.node=bitcoind',
|
|
90
|
+
'--bitcoin.regtest',
|
|
91
|
+
`--bitcoind.rpchost=${chainHost}:18443`,
|
|
92
|
+
`--bitcoind.rpcpass=${args.bitcoind_rpc_pass}`,
|
|
93
|
+
`--bitcoind.rpcuser=${args.bitcoind_rpc_user}`,
|
|
94
|
+
`--bitcoind.zmqpubrawblock=tcp://${chainHost}:${zmqBlockPort}`,
|
|
95
|
+
`--bitcoind.zmqpubrawtx=tcp://${chainHost}:${zmqTxPort}`,
|
|
96
|
+
'--debuglevel=trace',
|
|
97
|
+
`--externalip=127.0.0.1:9735`,
|
|
98
|
+
'--historicalsyncinterval=1s',
|
|
99
|
+
`--listen=0.0.0.0:9735`,
|
|
100
|
+
'--nobootstrap',
|
|
101
|
+
`--rpclisten=0.0.0.0:10009`,
|
|
102
|
+
'--trickledelay=1',
|
|
103
|
+
'--unsafe-disconnect',
|
|
104
|
+
];
|
|
105
|
+
|
|
81
106
|
return spawnDockerImage({
|
|
82
|
-
arguments: [
|
|
83
|
-
'--accept-keysend',
|
|
84
|
-
'--allow-circular-route',
|
|
85
|
-
'--autopilot.heuristic=externalscore:0.5',
|
|
86
|
-
'--autopilot.heuristic=preferential:0.5',
|
|
87
|
-
'--bitcoin.active',
|
|
88
|
-
'--bitcoin.minhtlc=1000',
|
|
89
|
-
'--bitcoin.node=bitcoind',
|
|
90
|
-
'--bitcoin.regtest',
|
|
91
|
-
`--bitcoind.rpchost=${chainHost}:18443`,
|
|
92
|
-
`--bitcoind.rpcpass=${args.bitcoind_rpc_pass}`,
|
|
93
|
-
`--bitcoind.rpcuser=${args.bitcoind_rpc_user}`,
|
|
94
|
-
`--bitcoind.zmqpubrawblock=tcp://${chainHost}:${zmqBlockPort}`,
|
|
95
|
-
`--bitcoind.zmqpubrawtx=tcp://${chainHost}:${zmqTxPort}`,
|
|
96
|
-
'--debuglevel=trace',
|
|
97
|
-
`--externalip=127.0.0.1:9735`,
|
|
98
|
-
'--historicalsyncinterval=1s',
|
|
99
|
-
`--listen=0.0.0.0:9735`,
|
|
100
|
-
'--nobootstrap',
|
|
101
|
-
`--rpclisten=0.0.0.0:10009`,
|
|
102
|
-
'--trickledelay=1',
|
|
103
|
-
'--unsafe-disconnect',
|
|
104
|
-
],
|
|
107
|
+
arguments: arguments.concat(args.configuration || []),
|
|
105
108
|
image: imageName(process.env.DOCKER_LND_VERSION),
|
|
106
109
|
ports: {
|
|
107
110
|
'9735/tcp': args.p2p_port,
|
package/package.json
CHANGED