multi: bump btcd to taproot aware version

This commit is contained in:
Oliver Gugger
2022-03-18 18:37:43 +01:00
parent 0dcaa511a2
commit 72c9582b85
24 changed files with 228 additions and 107 deletions

View File

@@ -228,6 +228,9 @@ func (p *JusticeDescriptor) assembleJusticeTxn(txWeight int64,
input.txOut.PkScript, justiceTxn, i,
txscript.StandardVerifyFlags,
nil, nil, input.txOut.Value,
txscript.NewCannedPrevOutputFetcher(
input.txOut.PkScript, input.txOut.Value,
),
)
if err != nil {
return nil, err

View File

@@ -269,7 +269,7 @@ func testJusticeDescriptor(t *testing.T, blobType blob.Type) {
justiceTxn.TxOut = outputs
txsort.InPlaceSort(justiceTxn)
hashCache := txscript.NewTxSigHashes(justiceTxn)
hashCache := input.NewTxSigHashesV0Only(justiceTxn)
// Create the sign descriptor used to sign for the to-local input.
toLocalSignDesc := &input.SignDescriptor{

View File

@@ -7,7 +7,6 @@ import (
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/btcutil/txsort"
"github.com/btcsuite/btcd/txscript"
"github.com/btcsuite/btcd/wire"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/input"
@@ -285,7 +284,7 @@ func (t *backupTask) craftSessionPayload(
}
// Construct a sighash cache to improve signing performance.
hashCache := txscript.NewTxSigHashes(justiceTxn)
hashCache := input.NewTxSigHashesV0Only(justiceTxn)
// Since the transaction inputs could have been reordered as a result of
// the BIP69 sort, create an index mapping each prevout to it's new