mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-19 05:45:21 +01:00
itest: add test coverage for Taproot tweak key mutation
This commit is contained in:
parent
082d68d0ca
commit
b3f6fe315e
@ -1151,6 +1151,21 @@ func assertPsbtSpend(ctx context.Context, t *harnessTest,
|
||||
finalTx, err := psbt.Extract(signedPacket)
|
||||
require.NoError(t.t, err)
|
||||
|
||||
// Make sure we can also sign a second time. This makes sure any key
|
||||
// tweaking that happened for the signing didn't affect any keys in the
|
||||
// cache.
|
||||
signResp2, err := alice.WalletKitClient.SignPsbt(
|
||||
ctx, &walletrpc.SignPsbtRequest{
|
||||
FundedPsbt: buf.Bytes(),
|
||||
},
|
||||
)
|
||||
require.NoError(t.t, err)
|
||||
signedPacket2, err := psbt.NewFromRawBytes(
|
||||
bytes.NewReader(signResp2.SignedPsbt), false,
|
||||
)
|
||||
require.NoError(t.t, err)
|
||||
verifySigned(signedPacket2)
|
||||
|
||||
buf.Reset()
|
||||
err = finalTx.Serialize(&buf)
|
||||
require.NoError(t.t, err)
|
||||
|
@ -104,6 +104,7 @@ func testRemoteSigner(net *lntest.NetworkHarness, t *harnessTest) {
|
||||
},
|
||||
}, {
|
||||
name: "psbt",
|
||||
randomSeed: true,
|
||||
fn: func(tt *harnessTest, wo, carol *lntest.HarnessNode) {
|
||||
runPsbtChanFunding(net, tt, carol, wo)
|
||||
runSignPsbtSegWitV0P2WKH(tt, net, wo)
|
||||
@ -126,6 +127,7 @@ func testRemoteSigner(net *lntest.NetworkHarness, t *harnessTest) {
|
||||
}, {
|
||||
name: "taproot",
|
||||
sendCoins: true,
|
||||
randomSeed: true,
|
||||
fn: func(tt *harnessTest, wo, carol *lntest.HarnessNode) {
|
||||
ctxt, cancel := context.WithTimeout(
|
||||
ctxb, 3*defaultTimeout,
|
||||
|
Loading…
Reference in New Issue
Block a user