ln-service 53.4.1 → 53.5.2
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
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# Versions
|
|
2
2
|
|
|
3
|
-
## 53.
|
|
3
|
+
## 53.5.2
|
|
4
|
+
|
|
5
|
+
- `getPayments`: Correct paging issue that prevented paging through all results
|
|
6
|
+
|
|
7
|
+
## 53.5.0
|
|
8
|
+
|
|
9
|
+
- `createWallet`: Add support for returning the admin `macaroon`
|
|
10
|
+
|
|
11
|
+
## 53.4.2
|
|
4
12
|
|
|
5
13
|
- `pay`, `payViaPaymentRequest`: Fix support for `outgoing_channels` constraint
|
|
6
14
|
|
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"cors": "2.8.5",
|
|
12
12
|
"express": "4.17.2",
|
|
13
13
|
"invoices": "2.0.3",
|
|
14
|
-
"lightning": "5.
|
|
14
|
+
"lightning": "5.4.0",
|
|
15
15
|
"macaroon": "3.0.4",
|
|
16
16
|
"morgan": "1.10.0",
|
|
17
17
|
"ws": "8.4.2"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"psbt": "1.1.10",
|
|
32
32
|
"rimraf": "3.0.2",
|
|
33
33
|
"secp256k1": "4.0.3",
|
|
34
|
-
"tiny-secp256k1": "2.
|
|
34
|
+
"tiny-secp256k1": "2.2.0",
|
|
35
35
|
"uuid": "8.3.2",
|
|
36
36
|
"varuint-bitcoin": "1.1.2"
|
|
37
37
|
},
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"scripts": {
|
|
56
56
|
"test": "echo $DOCKER_LND_VERSION && tap -j 2 --branches=1 --functions=1 --lines=1 --statements=1 -t 200 test/autopilotrpc-integration/*.js test/chainrpc-integration/*.js test/integration/*.js test/invoicesrpc-integration/*.js test/routerrpc-integration/*.js test/signerrpc-integration/*.js test/tower_clientrpc-integration/*.js test/tower_serverrpc-integration/*.js test/walletrpc-integration/*.js"
|
|
57
57
|
},
|
|
58
|
-
"version": "53.
|
|
58
|
+
"version": "53.5.2"
|
|
59
59
|
}
|
|
@@ -8,6 +8,7 @@ const {test} = require('@alexbosworth/tap');
|
|
|
8
8
|
|
|
9
9
|
const {addPeer} = require('./../../');
|
|
10
10
|
const {broadcastChainTransaction} = require('./../../');
|
|
11
|
+
const {cancelPendingChannel} = require('./../../');
|
|
11
12
|
const {createCluster} = require('./../macros');
|
|
12
13
|
const {delay} = require('./../macros');
|
|
13
14
|
const {deletePendingChannel} = require('./../../');
|
|
@@ -60,7 +61,7 @@ test(`Forfeit pending channel`, async ({end, equal}) => {
|
|
|
60
61
|
// Sign the funding to the target
|
|
61
62
|
const signTarget = await signPsbt({lnd, psbt: fundTarget.psbt});
|
|
62
63
|
|
|
63
|
-
// Fund the target channel
|
|
64
|
+
// Fund the target channel that will get stuck
|
|
64
65
|
await fundPendingChannels({
|
|
65
66
|
lnd,
|
|
66
67
|
channels: proposeToTarget.pending.map(n => n.id),
|
|
@@ -124,6 +125,17 @@ test(`Forfeit pending channel`, async ({end, equal}) => {
|
|
|
124
125
|
|
|
125
126
|
const stuckTx = extractTransaction({psbt: signTarget.psbt});
|
|
126
127
|
|
|
128
|
+
const [stuckPending] = proposeToTarget.pending;
|
|
129
|
+
|
|
130
|
+
// Try to cancel the pending channel, it will fail
|
|
131
|
+
try {
|
|
132
|
+
await cancelPendingChannel({lnd, id: stuckPending.id});
|
|
133
|
+
} catch (err) {
|
|
134
|
+
const [code] = err;
|
|
135
|
+
|
|
136
|
+
equal(code, 503, 'Pending channel cannot be canceled');
|
|
137
|
+
}
|
|
138
|
+
|
|
127
139
|
await deletePendingChannel({
|
|
128
140
|
lnd,
|
|
129
141
|
confirmed_transaction: transaction,
|
|
@@ -9,7 +9,7 @@ const {setupChannel} = require('./../macros');
|
|
|
9
9
|
|
|
10
10
|
const interval = 100;
|
|
11
11
|
const size = 3;
|
|
12
|
-
const times =
|
|
12
|
+
const times = 800;
|
|
13
13
|
|
|
14
14
|
// Getting the network centrality should return the centrality scores
|
|
15
15
|
test(`Get network centrality`, async ({end, equal, strictSame}) => {
|
|
@@ -19,42 +19,50 @@ test(`Get network centrality`, async ({end, equal, strictSame}) => {
|
|
|
19
19
|
|
|
20
20
|
const {lnd} = control;
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
try {
|
|
23
|
+
await control.generate({count: 100});
|
|
23
24
|
|
|
24
|
-
await setupChannel({
|
|
25
|
-
generate: target.generate,
|
|
26
|
-
lnd: target.lnd,
|
|
27
|
-
to: remote,
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
await asyncRetry({interval, times}, async () => {
|
|
31
25
|
await addPeer({lnd, public_key: remote.id, socket: remote.socket});
|
|
32
26
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
27
|
+
await setupChannel({lnd, generate: control.generate, to: target});
|
|
28
|
+
|
|
29
|
+
await setupChannel({
|
|
30
|
+
generate: target.generate,
|
|
31
|
+
lnd: target.lnd,
|
|
32
|
+
to: remote,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
await asyncRetry({interval, times}, async () => {
|
|
36
|
+
await addPeer({lnd, public_key: remote.id, socket: remote.socket});
|
|
37
|
+
|
|
38
|
+
const {nodes} = await getNetworkCentrality({lnd});
|
|
39
|
+
|
|
40
|
+
const controlScore = nodes.find(n => n.public_key === control.id);
|
|
41
|
+
const remoteScore = nodes.find(n => n.public_key === remote.id);
|
|
42
|
+
const targetScore = nodes.find(n => n.public_key === target.id);
|
|
43
|
+
|
|
44
|
+
if (!targetScore.betweenness || !targetScore.betweenness_normalized) {
|
|
45
|
+
throw new Error('UnexpectedValueForTargetScoreBetweenness');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (targetScore.betweenness !== 1e6) {
|
|
49
|
+
throw new Error('WrongBetweennessScore');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
equal(controlScore.betweenness, 0, 'No centrality on control');
|
|
53
|
+
equal(controlScore.betweenness_normalized, 0, 'No control centrality');
|
|
54
|
+
equal(remoteScore.betweenness, 0, 'No centrality on remote');
|
|
55
|
+
equal(remoteScore.betweenness_normalized, 0, 'No centrality on remote');
|
|
56
|
+
equal(targetScore.betweenness, 1e6, 'Centrality around target');
|
|
57
|
+
equal(targetScore.betweenness_normalized, 1e6, 'Centrality at target');
|
|
58
|
+
|
|
59
|
+
return;
|
|
60
|
+
});
|
|
61
|
+
} catch (err) {
|
|
62
|
+
equal(err, null, 'Expected no error');
|
|
63
|
+
} finally {
|
|
64
|
+
await kill({});
|
|
65
|
+
}
|
|
58
66
|
|
|
59
67
|
return end();
|
|
60
68
|
});
|
|
@@ -9,9 +9,9 @@ const {spawnLnd} = require('./../macros');
|
|
|
9
9
|
const {waitForTermination} = require('./../macros');
|
|
10
10
|
|
|
11
11
|
const all = promise => Promise.all(promise);
|
|
12
|
-
const interval =
|
|
12
|
+
const interval = 200;
|
|
13
13
|
const nodes = [{watchers: true}, {tower: true}];
|
|
14
|
-
const times =
|
|
14
|
+
const times = 1000;
|
|
15
15
|
|
|
16
16
|
// Disconnecting a watchtower should remove a watchtower
|
|
17
17
|
test(`Disconnect watchtower`, async ({end, equal, match}) => {
|