bolt07 1.9.3 → 1.9.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 +1 -1
- package/package.json +1 -1
- package/routing/hops_from_channels.js +7 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -92,6 +92,9 @@ module.exports = ({channels, destination}) => {
|
|
|
92
92
|
let cltvDelta = (overridePolicy || policy).cltv_delta || defaultCltvDelta;
|
|
93
93
|
const payIndex = chans.length - payNodesCount;
|
|
94
94
|
|
|
95
|
+
const nextCltvPolicy = ((nextPolicy || {}).policies || [])
|
|
96
|
+
.find(n => n.public_key === peer.public_key);
|
|
97
|
+
|
|
95
98
|
// The end of a route is where the penultimate node pays the ultimate one.
|
|
96
99
|
if (i < payIndex) {
|
|
97
100
|
cltvDelta = peer.cltv_delta;
|
|
@@ -102,6 +105,10 @@ module.exports = ({channels, destination}) => {
|
|
|
102
105
|
cltvDelta = endPolicies.find(n => n.public_key === payingKey).cltv_delta;
|
|
103
106
|
}
|
|
104
107
|
|
|
108
|
+
if (!!nextCltvPolicy) {
|
|
109
|
+
cltvDelta = nextCltvPolicy.cltv_delta;
|
|
110
|
+
}
|
|
111
|
+
|
|
105
112
|
return {
|
|
106
113
|
base_fee_mtokens: (overridePolicy || policy).base_fee_mtokens,
|
|
107
114
|
channel: channel.id,
|