lightning 12.0.2 → 12.0.4
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
|
@@ -110,6 +110,11 @@ module.exports = ({lnd}) => {
|
|
|
110
110
|
tokens: request.tokens,
|
|
111
111
|
});
|
|
112
112
|
} catch (err) {
|
|
113
|
+
sub.write({
|
|
114
|
+
action: forwardPaymentActions.reject,
|
|
115
|
+
incoming_circuit_key: data.incoming_circuit_key,
|
|
116
|
+
});
|
|
117
|
+
|
|
113
118
|
return emitErr([503, err.message]);
|
|
114
119
|
}
|
|
115
120
|
});
|
|
@@ -87,10 +87,6 @@ module.exports = forward => {
|
|
|
87
87
|
throw new Error('ExpectedOutgoingExpiryHeightInRpcForwardRequest');
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
if (forward.outgoing_expiry > forward.incoming_expiry) {
|
|
91
|
-
throw new Error('ExpectedIncomingForwardExpiryHigherThanOutgoingExpiry');
|
|
92
|
-
}
|
|
93
|
-
|
|
94
90
|
if (!forward.outgoing_requested_chan_id) {
|
|
95
91
|
throw new Error('ExpectedOutgoingRequestedChannelIdInRpcForwardRequest');
|
|
96
92
|
}
|
|
@@ -102,10 +98,6 @@ module.exports = forward => {
|
|
|
102
98
|
const incomingAmount = BigInt(forward.incoming_amount_msat);
|
|
103
99
|
const outgoingAmount = BigInt(forward.outgoing_amount_msat);
|
|
104
100
|
|
|
105
|
-
if (incomingAmount < outgoingAmount) {
|
|
106
|
-
throw new Error('UnexpectedNegativeFeeInRpcForwardRequest');
|
|
107
|
-
}
|
|
108
|
-
|
|
109
101
|
const hasOnion = !!forward.onion_blob && !!forward.onion_blob.length;
|
|
110
102
|
const totalFeeAmount = incomingAmount - outgoingAmount;
|
|
111
103
|
|
package/package.json
CHANGED
|
@@ -69,11 +69,6 @@ const tests = [
|
|
|
69
69
|
description: 'An outgoing expiry height is expected',
|
|
70
70
|
error: 'ExpectedOutgoingExpiryHeightInRpcForwardRequest',
|
|
71
71
|
},
|
|
72
|
-
{
|
|
73
|
-
args: makeForward({outgoing_expiry: 3}),
|
|
74
|
-
description: 'An outgoing expiry height is expected',
|
|
75
|
-
error: 'ExpectedIncomingForwardExpiryHigherThanOutgoingExpiry',
|
|
76
|
-
},
|
|
77
72
|
{
|
|
78
73
|
args: makeForward({outgoing_requested_chan_id: undefined}),
|
|
79
74
|
description: 'An outgoing requested channel id is expected',
|
|
@@ -84,11 +79,6 @@ const tests = [
|
|
|
84
79
|
description: 'A payment preimage hash is expected',
|
|
85
80
|
error: 'ExpectedPaymentHashBufferInRpcForwardRequest',
|
|
86
81
|
},
|
|
87
|
-
{
|
|
88
|
-
args: makeForward({outgoing_amount_msat: '3'}),
|
|
89
|
-
description: 'Outgoing amount should be equal or less than incoming',
|
|
90
|
-
error: 'UnexpectedNegativeFeeInRpcForwardRequest',
|
|
91
|
-
},
|
|
92
82
|
{
|
|
93
83
|
args: makeForward({}),
|
|
94
84
|
description: 'An RPC forward request is mapped to a request',
|