fundingManager: let CurrentNodeAnnouncement return copy instead of ref

This commit is contained in:
Johan T. Halseth authored and Olaoluwa Osuntokun committed 2017-08-08 12:29:27 -07:00
1 parent c497a63f14
commit 5c89ec6288
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -172,7 +172,7 @@ type fundingConfig struct {
// CurrentNodeAnnouncement should return the latest, fully signed node
// announcement from the backing Lighting Network node.
CurrentNodeAnnouncement func() (*lnwire.NodeAnnouncement, error)
CurrentNodeAnnouncement func() (lnwire.NodeAnnouncement, error)
// SendAnnouncement is used by the FundingManager to announce newly
// created channels to the rest of the Lightning Network.
@@ -1413,7 +1413,7 @@ func (f *fundingManager) announceChannel(localIDKey, remoteIDKey, localFundingKe
fndgLog.Errorf("can't generate node announcement: %v", err)
return
}
f.cfg.SendAnnouncement(nodeAnn)
f.cfg.SendAnnouncement(&nodeAnn)
}
// initFundingWorkflow sends a message to the funding manager instructing it
+1 -1
View File
@@ -136,7 +136,7 @@ func lndMain() error {
pubKey, msg,
)
},
CurrentNodeAnnouncement: func() (*lnwire.NodeAnnouncement, error) {
CurrentNodeAnnouncement: func() (lnwire.NodeAnnouncement, error) {
return server.genNodeAnnouncement(true)
},
SendAnnouncement: func(msg lnwire.Message) error {