multi: let FetchPkScript take SCID by value

Instead of a pointer.
This commit is contained in:
Elle Mouton committed 2025-09-01 12:10:30 +02:00
1 parent b77b698b9d
commit 06bf0c28b6
4 files changed
+9 -9

No files matched your search

+2 -2
View File
@@ -104,7 +104,7 @@ func CreateChanAnnouncement(chanProof *models.ChannelAuthProof,
// FetchPkScript defines a function that can be used to fetch the output script
// for the transaction with the given SCID.
type FetchPkScript func(*lnwire.ShortChannelID) ([]byte, error)
type FetchPkScript func(lnwire.ShortChannelID) ([]byte, error)
// ValidateChannelAnn validates the channel announcement.
func ValidateChannelAnn(a lnwire.ChannelAnnouncement,
@@ -249,7 +249,7 @@ func validateChannelAnn2(a *lnwire.ChannelAnnouncement2,
// If bitcoin keys are not provided, then we need to get the
// on-chain output key since this will be the 3rd key in the
// 3-of-3 MuSig2 signature.
pkScript, err := fetchPkScript(&a.ShortChannelID.Val)
pkScript, err := fetchPkScript(a.ShortChannelID.Val)
if err != nil {
return err
}
+1 -1
View File
@@ -223,7 +223,7 @@ func test3of3MuSig2ChanAnnouncement(t *testing.T) {
// We'll pass in a mock tx fetcher that will return the funding output
// containing this key. This is needed since the output key can not be
// determined from the channel announcement itself.
fetchTx := func(chanID *lnwire.ShortChannelID) ([]byte, error) {
fetchTx := func(_ lnwire.ShortChannelID) ([]byte, error) {
return pkScript, nil
}