lnrpc/peers: handle feature bit changes in updateNodeAnnouncement

This commit is contained in:
positiveblue committed 2022-04-02 19:10:25 -07:00
1 parent 76196db70e
commit ae2aa5671f
5 files changed
+171 -1

No files matched your search

+8
View File
@@ -38,6 +38,14 @@ func NodeAnnSetColor(newColor color.RGBA) func(*lnwire.NodeAnnouncement) {
}
}
// NodeAnnSetFeatures is a functional option that allows updating the features of
// the given node announcement.
func NodeAnnSetFeatures(features *lnwire.RawFeatureVector) func(*lnwire.NodeAnnouncement) {
return func(nodeAnn *lnwire.NodeAnnouncement) {
nodeAnn.Features = features
}
}
// NodeAnnSetTimestamp is a functional option that sets the timestamp of the
// announcement to the current time, or increments it if the timestamp is
// already in the future.