@@ -70,44 +70,44 @@ func (n *Node) PubKey() (*btcec.PublicKey, error) {
7070//
7171// NOTE: By having this method to access an attribute, we ensure we only need
7272// to fully deserialize the signature if absolutely necessary.
73- func (l * Node ) AuthSig () (* ecdsa.Signature , error ) {
74- return ecdsa .ParseSignature (l .AuthSigBytes )
73+ func (n * Node ) AuthSig () (* ecdsa.Signature , error ) {
74+ return ecdsa .ParseSignature (n .AuthSigBytes )
7575}
7676
7777// AddPubKey is a setter-link method that can be used to swap out the public
7878// key for a node.
79- func (l * Node ) AddPubKey (key * btcec.PublicKey ) {
80- copy (l .PubKeyBytes [:], key .SerializeCompressed ())
79+ func (n * Node ) AddPubKey (key * btcec.PublicKey ) {
80+ copy (n .PubKeyBytes [:], key .SerializeCompressed ())
8181}
8282
8383// NodeAnnouncement retrieves the latest node announcement of the node.
84- func (l * Node ) NodeAnnouncement (signed bool ) (* lnwire.NodeAnnouncement1 ,
84+ func (n * Node ) NodeAnnouncement (signed bool ) (* lnwire.NodeAnnouncement1 ,
8585 error ) {
8686
87- if ! l .HaveNodeAnnouncement {
87+ if ! n .HaveNodeAnnouncement {
8888 return nil , fmt .Errorf ("node does not have node announcement" )
8989 }
9090
91- alias , err := lnwire .NewNodeAlias (l .Alias )
91+ alias , err := lnwire .NewNodeAlias (n .Alias )
9292 if err != nil {
9393 return nil , err
9494 }
9595
9696 nodeAnn := & lnwire.NodeAnnouncement1 {
97- Features : l .Features .RawFeatureVector ,
98- NodeID : l .PubKeyBytes ,
99- RGBColor : l .Color ,
97+ Features : n .Features .RawFeatureVector ,
98+ NodeID : n .PubKeyBytes ,
99+ RGBColor : n .Color ,
100100 Alias : alias ,
101- Addresses : l .Addresses ,
102- Timestamp : uint32 (l .LastUpdate .Unix ()),
103- ExtraOpaqueData : l .ExtraOpaqueData ,
101+ Addresses : n .Addresses ,
102+ Timestamp : uint32 (n .LastUpdate .Unix ()),
103+ ExtraOpaqueData : n .ExtraOpaqueData ,
104104 }
105105
106106 if ! signed {
107107 return nodeAnn , nil
108108 }
109109
110- sig , err := lnwire .NewSigFromECDSARawSignature (l .AuthSigBytes )
110+ sig , err := lnwire .NewSigFromECDSARawSignature (n .AuthSigBytes )
111111 if err != nil {
112112 return nil , err
113113 }
0 commit comments