You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lightning/bolts#1163 makes the channel update in
onion failures optional. One reason for this change is that it can be a
privacy issue: by applying a `channel_update` received from an payment
attempt, you may reveal that you are the sender. Another reason is that
some nodes have been omitting that field for years (which was arguably
a bug), and it's better to be able to correctly handle such failures.
// let's try again, router will have updated its state
@@ -240,7 +247,7 @@ class PaymentLifecycle(nodeParams: NodeParams, cfg: SendPaymentConfig, router: A
240
247
goto(WAITING_FOR_ROUTE) using WaitingForRoute(request.copy(recipient = recipient1), failures :+ failure, ignore1)
241
248
}
242
249
} else {
243
-
// this node is fishy, it gave us a bad sig!! let's filter it out
250
+
// this node is fishy, it gave us a bad channel update signature: let's filter it out.
244
251
log.warning(s"got bad signature from node=$nodeId update=${failureMessage.update}")
245
252
request match {
246
253
case_: SendPaymentToRoute=>
@@ -289,38 +296,49 @@ class PaymentLifecycle(nodeParams: NodeParams, cfg: SendPaymentConfig, router: A
289
296
valextraEdges1= data.route.hops.find(_.nodeId == nodeId) match {
290
297
caseSome(hop) => hop.params match {
291
298
caseann: HopRelayParams.FromAnnouncement=>
292
-
if (ann.channelUpdate.shortChannelId != failure.update.shortChannelId) {
293
-
// it is possible that nodes in the route prefer using a different channel (to the same N+1 node) than the one we requested, that's fine
294
-
log.info("received an update for a different channel than the one we asked: requested={} actual={} update={}", ann.channelUpdate.shortChannelId, failure.update.shortChannelId, failure.update)
log.info("got a new update for shortChannelId={}: old={} new={}", ann.channelUpdate.shortChannelId, ann.channelUpdate, failure.update)
299
+
failure.update match {
300
+
caseSome(update) if ann.channelUpdate.shortChannelId != update.shortChannelId =>
301
+
// it is possible that nodes in the route prefer using a different channel (to the same N+1 node) than the one we requested, that's fine
302
+
log.info("received an update for a different channel than the one we asked: requested={} actual={} update={}", ann.channelUpdate.shortChannelId, update.shortChannelId, update)
log.info("received an update for a routing hint (shortChannelId={} nodeId={} enabled={} update={})", failure.update.shortChannelId, nodeId, failure.update.channelFlags.isEnabled, failure.update)
log.info("received an update for a routing hint (shortChannelId={} nodeId={} enabled={} update={})", update.shortChannelId, nodeId, update.channelFlags.isEnabled, failure.update)
0 commit comments