@@ -244,11 +244,11 @@ type Config struct {
244244 // FetchSelfAnnouncement retrieves our current node announcement, for
245245 // use when determining whether we should update our peers about our
246246 // presence in the network.
247- FetchSelfAnnouncement func () lnwire.NodeAnnouncement
247+ FetchSelfAnnouncement func () lnwire.NodeAnnouncement1
248248
249249 // UpdateSelfAnnouncement produces a new announcement for our node with
250250 // an updated timestamp which can be broadcast to our peers.
251- UpdateSelfAnnouncement func () (lnwire.NodeAnnouncement , error )
251+ UpdateSelfAnnouncement func () (lnwire.NodeAnnouncement1 , error )
252252
253253 // ProofMatureDelta the number of confirmations which is needed before
254254 // exchange the channel announcement proofs.
@@ -1186,7 +1186,7 @@ func (d *deDupedAnnouncements) addMsg(message networkMsg) {
11861186
11871187 // Node announcements are identified by the Vertex field. Use the
11881188 // NodeID to create the corresponding Vertex.
1189- case * lnwire.NodeAnnouncement :
1189+ case * lnwire.NodeAnnouncement1 :
11901190 sender := route .NewVertex (message .source )
11911191 deDupKey := route .Vertex (msg .NodeID )
11921192
@@ -1195,7 +1195,8 @@ func (d *deDupedAnnouncements) addMsg(message networkMsg) {
11951195 oldTimestamp := uint32 (0 )
11961196 mws , ok := d .nodeAnnouncements [deDupKey ]
11971197 if ok {
1198- oldTimestamp = mws .msg .(* lnwire.NodeAnnouncement ).Timestamp
1198+ ann , _ := mws .msg .(* lnwire.NodeAnnouncement1 )
1199+ oldTimestamp = ann .Timestamp
11991200 }
12001201
12011202 // Discard the message if it's old.
@@ -1806,7 +1807,7 @@ func (d *AuthenticatedGossiper) retransmitStaleAnns(ctx context.Context,
18061807 return nil
18071808 }
18081809
1809- // We'll also check that our NodeAnnouncement is not too old.
1810+ // We'll also check that our NodeAnnouncement1 is not too old.
18101811 currentNodeAnn := d .cfg .FetchSelfAnnouncement ()
18111812 timestamp := time .Unix (int64 (currentNodeAnn .Timestamp ), 0 )
18121813 timeElapsed := now .Sub (timestamp )
@@ -2062,7 +2063,7 @@ func (d *AuthenticatedGossiper) fetchPKScript(chanID lnwire.ShortChannelID) (
20622063// addNode processes the given node announcement, and adds it to our channel
20632064// graph.
20642065func (d * AuthenticatedGossiper ) addNode (ctx context.Context ,
2065- msg * lnwire.NodeAnnouncement , op ... batch.SchedulerOption ) error {
2066+ msg * lnwire.NodeAnnouncement1 , op ... batch.SchedulerOption ) error {
20662067
20672068 if err := netann .ValidateNodeAnn (msg ); err != nil {
20682069 return fmt .Errorf ("unable to validate node announcement: %w" ,
@@ -2153,7 +2154,7 @@ func (d *AuthenticatedGossiper) processNetworkAnnouncement(ctx context.Context,
21532154 // A new node announcement has arrived which either presents new
21542155 // information about a node in one of the channels we know about, or a
21552156 // updating previously advertised information.
2156- case * lnwire.NodeAnnouncement :
2157+ case * lnwire.NodeAnnouncement1 :
21572158 return d .handleNodeAnnouncement (ctx , nMsg , msg , schedulerOp )
21582159
21592160 // A new channel announcement has arrived, this indicates the
@@ -2248,7 +2249,7 @@ func (d *AuthenticatedGossiper) processZombieUpdate(_ context.Context,
22482249// announcement fields and returns an error if they are invalid to prevent
22492250// forwarding invalid node announcements to our peers.
22502251func (d * AuthenticatedGossiper ) fetchNodeAnn (ctx context.Context ,
2251- pubKey [33 ]byte ) (* lnwire.NodeAnnouncement , error ) {
2252+ pubKey [33 ]byte ) (* lnwire.NodeAnnouncement1 , error ) {
22522253
22532254 node , err := d .cfg .Graph .FetchNode (ctx , pubKey )
22542255 if err != nil {
@@ -2478,12 +2479,12 @@ func (d *AuthenticatedGossiper) latestHeight() uint32 {
24782479
24792480// handleNodeAnnouncement processes a new node announcement.
24802481func (d * AuthenticatedGossiper ) handleNodeAnnouncement (ctx context.Context ,
2481- nMsg * networkMsg , nodeAnn * lnwire.NodeAnnouncement ,
2482+ nMsg * networkMsg , nodeAnn * lnwire.NodeAnnouncement1 ,
24822483 ops []batch.SchedulerOption ) ([]networkMsg , bool ) {
24832484
24842485 timestamp := time .Unix (int64 (nodeAnn .Timestamp ), 0 )
24852486
2486- log .Debugf ("Processing NodeAnnouncement : peer=%v, timestamp=%v, " +
2487+ log .Debugf ("Processing NodeAnnouncement1 : peer=%v, timestamp=%v, " +
24872488 "node=%x, source=%x" , nMsg .peer , timestamp , nodeAnn .NodeID ,
24882489 nMsg .source .SerializeCompressed ())
24892490
@@ -2542,7 +2543,7 @@ func (d *AuthenticatedGossiper) handleNodeAnnouncement(ctx context.Context,
25422543 nMsg .err <- nil
25432544 // TODO(roasbeef): get rid of the above
25442545
2545- log .Debugf ("Processed NodeAnnouncement : peer=%v, timestamp=%v, " +
2546+ log .Debugf ("Processed NodeAnnouncement1 : peer=%v, timestamp=%v, " +
25462547 "node=%x, source=%x" , nMsg .peer , timestamp , nodeAnn .NodeID ,
25472548 nMsg .source .SerializeCompressed ())
25482549
0 commit comments