ln-service 53.4.2 → 53.5.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 +4 -0
- package/README.md +3 -0
- package/package.json +2 -2
- package/test/integration/test_delete_pending_channel.js +13 -1
package/CHANGELOG.md
CHANGED
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.3.
|
|
14
|
+
"lightning": "5.3.3",
|
|
15
15
|
"macaroon": "3.0.4",
|
|
16
16
|
"morgan": "1.10.0",
|
|
17
17
|
"ws": "8.4.2"
|
|
@@ -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.0"
|
|
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,
|