mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-18 14:44:22 +01:00
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:
@@ -82,9 +82,9 @@ func testOpenChannelAfterReorg(net *lntest.NetworkHarness, t *harnessTest) {
|
||||
// open, then broadcast the funding transaction
|
||||
chanAmt := funding.MaxBtcFundingAmount
|
||||
pushAmt := btcutil.Amount(0)
|
||||
ctxt, _ := context.WithTimeout(ctxb, channelOpenTimeout)
|
||||
pendingUpdate, err := net.OpenPendingChannel(ctxt, net.Alice, net.Bob,
|
||||
chanAmt, pushAmt)
|
||||
pendingUpdate, err := net.OpenPendingChannel(
|
||||
net.Alice, net.Bob, chanAmt, pushAmt,
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to open channel: %v", err)
|
||||
}
|
||||
@@ -125,7 +125,7 @@ func testOpenChannelAfterReorg(net *lntest.NetworkHarness, t *harnessTest) {
|
||||
if err != nil {
|
||||
t.Fatalf("unable to get current blockheight %v", err)
|
||||
}
|
||||
ctxt, _ = context.WithTimeout(ctxb, defaultTimeout)
|
||||
ctxt, _ := context.WithTimeout(ctxb, defaultTimeout)
|
||||
err = waitForNodeBlockHeight(ctxt, net.Alice, minerHeight)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to sync to chain: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user