discovery: modify SignAnnouncement to take a MessageSigner
This commit modifies the SignAnnouncement helper function to instead take a MessageSigner interface rather than the deprecated MessageSigner struct. We also modify the function to explicitly take the identity public key to use when signing.
This commit is contained in:
2 files changed
+39
-17
No files matched your search
+2
-2
@@ -109,7 +109,7 @@ func copyPubKey(pub *btcec.PublicKey) *btcec.PublicKey {
|
||||
|
||||
// SignAnnouncement is a helper function which is used to sign any outgoing
|
||||
// channel node node announcement messages.
|
||||
func SignAnnouncement(signer *lnwallet.MessageSigner,
|
||||
func SignAnnouncement(signer lnwallet.MessageSigner, pubKey *btcec.PublicKey,
|
||||
msg lnwire.Message) (*btcec.Signature, error) {
|
||||
|
||||
var (
|
||||
@@ -132,5 +132,5 @@ func SignAnnouncement(signer *lnwallet.MessageSigner,
|
||||
return nil, errors.Errorf("unable to get data to sign: %v", err)
|
||||
}
|
||||
|
||||
return signer.SignData(data)
|
||||
return signer.SignMessage(pubKey, data)
|
||||
}
|
||||
Reference in new issue
Block a user