mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-30 02:21:08 +02:00
multi: use btcd's btcec/v2 and btcutil modules
This commit was previously split into the following parts to ease review: - 2d746f68: replace imports - 4008f0fd: use ecdsa.Signature - 849e33d1: remove btcec.S256() - b8f6ebbd: use v2 library correctly - fa80bca9: bump go modules
This commit is contained in:
@ -4,9 +4,9 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
|
||||
"github.com/btcsuite/btcd/btcec"
|
||||
"github.com/btcsuite/btcd/btcec/v2"
|
||||
"github.com/btcsuite/btcd/btcutil"
|
||||
"github.com/btcsuite/btcd/chaincfg/chainhash"
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/go-errors/errors"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
@ -32,7 +32,7 @@ func ValidateChannelAnn(a *lnwire.ChannelAnnouncement) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
bitcoinKey1, err := btcec.ParsePubKey(a.BitcoinKey1[:], btcec.S256())
|
||||
bitcoinKey1, err := btcec.ParsePubKey(a.BitcoinKey1[:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -47,7 +47,7 @@ func ValidateChannelAnn(a *lnwire.ChannelAnnouncement) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
bitcoinKey2, err := btcec.ParsePubKey(a.BitcoinKey2[:], btcec.S256())
|
||||
bitcoinKey2, err := btcec.ParsePubKey(a.BitcoinKey2[:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -61,7 +61,7 @@ func ValidateChannelAnn(a *lnwire.ChannelAnnouncement) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
nodeKey1, err := btcec.ParsePubKey(a.NodeID1[:], btcec.S256())
|
||||
nodeKey1, err := btcec.ParsePubKey(a.NodeID1[:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -73,7 +73,7 @@ func ValidateChannelAnn(a *lnwire.ChannelAnnouncement) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
nodeKey2, err := btcec.ParsePubKey(a.NodeID2[:], btcec.S256())
|
||||
nodeKey2, err := btcec.ParsePubKey(a.NodeID2[:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -100,7 +100,7 @@ func ValidateNodeAnn(a *lnwire.NodeAnnouncement) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
nodeKey, err := btcec.ParsePubKey(a.NodeID[:], btcec.S256())
|
||||
nodeKey, err := btcec.ParsePubKey(a.NodeID[:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user