From f1124a0ff92ae633025200c799ee097b25c41cfb Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 18 Nov 2022 11:10:12 +0100 Subject: [PATCH 1/2] itest: fix taproot itest timeout issue --- lntest/itest/lnd_remote_signer_test.go | 11 ++++++----- lntest/itest/lnd_taproot_test.go | 10 ++++++++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/lntest/itest/lnd_remote_signer_test.go b/lntest/itest/lnd_remote_signer_test.go index 717cbdaa7..45dcbc3e1 100644 --- a/lntest/itest/lnd_remote_signer_test.go +++ b/lntest/itest/lnd_remote_signer_test.go @@ -129,11 +129,8 @@ func testRemoteSigner(net *lntest.NetworkHarness, t *harnessTest) { sendCoins: true, randomSeed: true, fn: func(tt *harnessTest, wo, carol *lntest.HarnessNode) { - ctxt, cancel := context.WithTimeout( - ctxb, 3*defaultTimeout, - ) - defer cancel() - + longTimeout := 3 * defaultTimeout + ctxt, cancel := context.WithTimeout(ctxb, longTimeout) testTaprootSendCoinsKeySpendBip86(ctxt, tt, wo, net) testTaprootComputeInputScriptKeySpendBip86( ctxt, tt, wo, net, @@ -143,10 +140,14 @@ func testRemoteSigner(net *lntest.NetworkHarness, t *harnessTest) { testTaprootSignOutputRawKeySpendRootHash( ctxt, tt, wo, net, ) + cancel() + + ctxt, cancel = context.WithTimeout(ctxb, longTimeout) testTaprootMuSig2KeySpendRootHash(ctxt, tt, wo, net) testTaprootMuSig2ScriptSpend(ctxt, tt, wo, net) testTaprootMuSig2KeySpendBip86(ctxt, tt, wo, net) testTaprootMuSig2CombinedLeafKeySpend(ctxt, tt, wo, net) + cancel() }, }} diff --git a/lntest/itest/lnd_taproot_test.go b/lntest/itest/lnd_taproot_test.go index f953bf7a2..ad16cce7c 100644 --- a/lntest/itest/lnd_taproot_test.go +++ b/lntest/itest/lnd_taproot_test.go @@ -46,23 +46,29 @@ var ( // outputs. func testTaproot(net *lntest.NetworkHarness, t *harnessTest) { ctxb := context.Background() - ctxt, cancel := context.WithTimeout(ctxb, 2*defaultTimeout) - defer cancel() + longTimeout := 2 * defaultTimeout + ctxt, cancel := context.WithTimeout(ctxb, longTimeout) testTaprootSendCoinsKeySpendBip86(ctxt, t, net.Alice, net) testTaprootComputeInputScriptKeySpendBip86(ctxt, t, net.Alice, net) testTaprootSignOutputRawScriptSpend(ctxt, t, net.Alice, net) testTaprootSignOutputRawKeySpendBip86(ctxt, t, net.Alice, net) testTaprootSignOutputRawKeySpendRootHash(ctxt, t, net.Alice, net) + cancel() + + ctxt, cancel = context.WithTimeout(ctxb, longTimeout) testTaprootMuSig2KeySpendBip86(ctxt, t, net.Alice, net) testTaprootMuSig2KeySpendRootHash(ctxt, t, net.Alice, net) testTaprootMuSig2ScriptSpend(ctxt, t, net.Alice, net) testTaprootMuSig2CombinedLeafKeySpend(ctxt, t, net.Alice, net) + cancel() + ctxt, cancel = context.WithTimeout(ctxb, longTimeout) testTaprootImportTapscriptFullTree(ctxt, t, net.Alice, net) testTaprootImportTapscriptPartialReveal(ctxt, t, net.Alice, net) testTaprootImportTapscriptRootHashOnly(ctxt, t, net.Alice, net) testTaprootImportTapscriptFullKey(ctxt, t, net.Alice, net) + cancel() } // testTaprootSendCoinsKeySpendBip86 tests sending to and spending from From 649b9671fbb934a8a41ffe7cc0ee18864c7e5a37 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 18 Nov 2022 11:10:20 +0100 Subject: [PATCH 2/2] docs: add release notes --- docs/release-notes/release-notes-0.16.0.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/release-notes-0.16.0.md b/docs/release-notes/release-notes-0.16.0.md index fe0c9fa16..8eb487776 100644 --- a/docs/release-notes/release-notes-0.16.0.md +++ b/docs/release-notes/release-notes-0.16.0.md @@ -248,7 +248,8 @@ implemented, please refer to [README](https://github.com/lightningnetwork/lnd/tree/master/lntemp) for more details. Along the way, several PRs([6776](https://github.com/lightningnetwork/lnd/pull/6776), -[6822](https://github.com/lightningnetwork/lnd/pull/6822)) have been made to +[6822](https://github.com/lightningnetwork/lnd/pull/6822), +[7172](https://github.com/lightningnetwork/lnd/pull/7172)) have been made to refactor the itest for code health and maintenance. # Contributors (Alphabetical Order)