mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-30 10:35:32 +02:00
multi: partition lnwire.ChanUpdateFlag into ChannelFlags and MessageFlags
In this commit: * we partition lnwire.ChanUpdateFlag into two (ChanUpdateChanFlags and ChanUpdateMsgFlags), from a uint16 to a pair of uint8's * we rename the ChannelUpdate.Flags to ChannelFlags and add an additional MessageFlags field, which will be used to indicate the presence of the optional field HtlcMaximumMsat within the ChannelUpdate. * we partition ChannelEdgePolicy.Flags into message and channel flags. This change corresponds to the partitioning of the ChannelUpdate's Flags field into MessageFlags and ChannelFlags. Co-authored-by: Johan T. Halseth <johanth@gmail.com>
This commit is contained in:
committed by
Johan T. Halseth
parent
375be936ce
commit
0fd6004958
@ -339,7 +339,7 @@ func addToTopologyChange(graph *channeldb.ChannelGraph, update *TopologyChange,
|
||||
// the second node.
|
||||
sourceNode := edgeInfo.NodeKey1
|
||||
connectingNode := edgeInfo.NodeKey2
|
||||
if m.Flags&lnwire.ChanUpdateDirection == 1 {
|
||||
if m.ChannelFlags&lnwire.ChanUpdateDirection == 1 {
|
||||
sourceNode = edgeInfo.NodeKey2
|
||||
connectingNode = edgeInfo.NodeKey1
|
||||
}
|
||||
@ -363,7 +363,7 @@ func addToTopologyChange(graph *channeldb.ChannelGraph, update *TopologyChange,
|
||||
FeeRate: m.FeeProportionalMillionths,
|
||||
AdvertisingNode: aNode,
|
||||
ConnectingNode: cNode,
|
||||
Disabled: m.Flags&lnwire.ChanUpdateDisabled != 0,
|
||||
Disabled: m.ChannelFlags&lnwire.ChanUpdateDisabled != 0,
|
||||
}
|
||||
edgeUpdate.AdvertisingNode.Curve = nil
|
||||
edgeUpdate.ConnectingNode.Curve = nil
|
||||
|
Reference in New Issue
Block a user