Merge pull request #1387 from wpaulino/send-disable-chan-update

multi: send a channel update with disabled flag set on channel close
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2018-07-23 17:46:37 -07:00
commit e0baa49690
10 files changed
+686 -458

No files matched your search

+5
View File
@@ -285,6 +285,10 @@ type ChannelEdgeUpdate struct {
// ConnectingNode is the node that the advertising node connects to.
ConnectingNode *btcec.PublicKey
// Disabled, if true, signals that the channel is unavailable to relay
// payments.
Disabled bool
}
// appendTopologyChange appends the passed update message to the passed
@@ -359,6 +363,7 @@ func addToTopologyChange(graph *channeldb.ChannelGraph, update *TopologyChange,
FeeRate: m.FeeProportionalMillionths,
AdvertisingNode: aNode,
ConnectingNode: cNode,
Disabled: m.Flags&lnwire.ChanUpdateDisabled != 0,
}
edgeUpdate.AdvertisingNode.Curve = nil
edgeUpdate.ConnectingNode.Curve = nil