diff --git a/lntest/itest/lnd_psbt_test.go b/lntest/itest/lnd_psbt_test.go index a2495ce75..4644d54bc 100644 --- a/lntest/itest/lnd_psbt_test.go +++ b/lntest/itest/lnd_psbt_test.go @@ -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) diff --git a/lntest/itest/lnd_remote_signer_test.go b/lntest/itest/lnd_remote_signer_test.go index 2e66f9c31..717cbdaa7 100644 --- a/lntest/itest/lnd_remote_signer_test.go +++ b/lntest/itest/lnd_remote_signer_test.go @@ -103,7 +103,8 @@ func testRemoteSigner(net *lntest.NetworkHarness, t *harnessTest) { runCPFP(net, tt, wo, carol) }, }, { - name: "psbt", + name: "psbt", + randomSeed: true, fn: func(tt *harnessTest, wo, carol *lntest.HarnessNode) { runPsbtChanFunding(net, tt, carol, wo) runSignPsbtSegWitV0P2WKH(tt, net, wo) @@ -124,8 +125,9 @@ func testRemoteSigner(net *lntest.NetworkHarness, t *harnessTest) { runSignVerifyMessage(tt, net, wo) }, }, { - name: "taproot", - sendCoins: true, + name: "taproot", + sendCoins: true, + randomSeed: true, fn: func(tt *harnessTest, wo, carol *lntest.HarnessNode) { ctxt, cancel := context.WithTimeout( ctxb, 3*defaultTimeout,