itest: fix taproot itest timeout issue

This commit is contained in:
Oliver Gugger 2022-11-18 11:10:12 +01:00
parent 67e2e382bc
commit f1124a0ff9
No known key found for this signature in database
GPG Key ID: 8E4256593F177720
2 changed files with 14 additions and 7 deletions

View File

@ -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()
},
}}

View File

@ -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