itest: manage context timeout inside network harness

This is the last commit to refactor the context management such that all
the timeout are managed inside the network harness.
This commit is contained in:
yyforyongyu
2021-08-20 01:48:27 +08:00
parent d9e9238b0c
commit 5a94919b7e
13 changed files with 49 additions and 64 deletions

View File

@@ -902,9 +902,8 @@ func testChanRestoreScenario(t *harnessTest, net *lntest.NetworkHarness,
var chanPoint *lnrpc.ChannelPoint
switch {
case testCase.unconfirmed:
ctxt, _ := context.WithTimeout(ctxb, channelOpenTimeout)
_, err := net.OpenPendingChannel(
ctxt, from, to, chanAmt, pushAmt,
from, to, chanAmt, pushAmt,
)
if err != nil {
t.Fatalf("couldn't open pending channel: %v", err)