lnrpc/peers: handle alias changes in updateNodeAnnouncement
This commit is contained in:
4 files changed
+165
-6
No files matched your search
@@ -13,6 +13,14 @@ import (
|
||||
// lnwire.NodeAnnouncement.
|
||||
type NodeAnnModifier func(*lnwire.NodeAnnouncement)
|
||||
|
||||
// NodeAnnSetAlias is a functional option that sets the alias of the
|
||||
// given node announcment.
|
||||
func NodeAnnSetAlias(alias lnwire.NodeAlias) func(*lnwire.NodeAnnouncement) {
|
||||
return func(nodeAnn *lnwire.NodeAnnouncement) {
|
||||
nodeAnn.Alias = alias
|
||||
}
|
||||
}
|
||||
|
||||
// NodeAnnSetAddrs is a functional option that allows updating the addresses of
|
||||
// the given node announcement.
|
||||
func NodeAnnSetAddrs(addrs []net.Addr) func(*lnwire.NodeAnnouncement) {
|
||||
|
||||
Reference in new issue
Block a user