mirror of
https://github.com/lightninglabs/aperture.git
synced 2025-12-17 09:04:19 +01:00
multi: bump btcec/v2 and btcutil to new versions
This commit is contained in:
committed by
Oliver Gugger
parent
7a8449f1bd
commit
2c3cb8c9f7
@@ -8,9 +8,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/btcsuite/btcd/btcec"
|
||||
"github.com/btcsuite/btcd/btcec/v2/ecdsa"
|
||||
"github.com/btcsuite/btcd/btcutil"
|
||||
"github.com/btcsuite/btcd/chaincfg"
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/lightningnetwork/lnd/lntypes"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
"github.com/lightningnetwork/lnd/zpay32"
|
||||
@@ -44,17 +44,14 @@ func EncodePayReq(payReq *zpay32.Invoice) (string, error) {
|
||||
reqString, err := payReq.Encode(
|
||||
zpay32.MessageSigner{
|
||||
SignCompact: func(hash []byte) ([]byte, error) {
|
||||
// btcec.SignCompact returns a
|
||||
// ecdsa.SignCompact returns a
|
||||
// pubkey-recoverable signature
|
||||
sig, err := btcec.SignCompact(
|
||||
btcec.S256(),
|
||||
privKey,
|
||||
payReq.PaymentHash[:],
|
||||
true,
|
||||
sig, err := ecdsa.SignCompact(
|
||||
privKey, payReq.PaymentHash[:], true,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf(
|
||||
"can't sign the hash: %v", err)
|
||||
return nil, fmt.Errorf("can't sign "+
|
||||
"the hash: %v", err)
|
||||
}
|
||||
|
||||
return sig, nil
|
||||
|
||||
Reference in New Issue
Block a user