lnrpc/peers: handle feature bit changes in updateNodeAnnouncement

This commit is contained in:
positiveblue
2022-01-02 15:56:04 -08:00
parent 76196db70e
commit ae2aa5671f
5 changed files with 171 additions and 1 deletions

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.