@@ -65,7 +65,7 @@ func TestLoopOutSuccess(t *testing.T) {
65
65
signalPrepaymentResult := ctx .AssertPaid (prepayInvoiceDesc )
66
66
67
67
// Expect client to register for conf.
68
- confIntent := ctx .AssertRegisterConf (false , req .HtlcConfirmations )
68
+ confIntent := ctx .Context . AssertRegisterConf (false , req .HtlcConfirmations )
69
69
70
70
testLoopOutSuccess (ctx , testRequest .Amount , info .SwapHash ,
71
71
signalPrepaymentResult , signalSwapPaymentResult , false ,
@@ -89,7 +89,7 @@ func TestLoopOutFailOffchain(t *testing.T) {
89
89
signalSwapPaymentResult := ctx .AssertPaid (swapInvoiceDesc )
90
90
signalPrepaymentResult := ctx .AssertPaid (prepayInvoiceDesc )
91
91
92
- ctx .AssertRegisterConf (false , defaultConfirmations )
92
+ ctx .Context . AssertRegisterConf (false , defaultConfirmations )
93
93
94
94
signalSwapPaymentResult (
95
95
errors .New (lndclient .PaymentResultUnknownPaymentHash ),
@@ -274,7 +274,9 @@ func testLoopOutResume(t *testing.T, confs uint32, expired, preimageRevealed,
274
274
signalPrepaymentResult := ctx .AssertPaid (prepayInvoiceDesc )
275
275
276
276
// Expect client to register for our expected number of confirmations.
277
- confIntent := ctx .AssertRegisterConf (preimageRevealed , int32 (confs ))
277
+ confIntent := ctx .Context .AssertRegisterConf (
278
+ preimageRevealed , int32 (confs ),
279
+ )
278
280
279
281
htlc , err := GetHtlc (
280
282
hash , & pendingSwap .Contract .SwapContract ,
@@ -325,7 +327,7 @@ func testLoopOutSuccess(ctx *testContext, amt btcutil.Amount, hash lntypes.Hash,
325
327
326
328
// Expect a signing request in the non taproot case.
327
329
if scriptVersion != swap .HtlcV3 {
328
- <- ctx .Lnd .SignOutputRawChannel
330
+ <- ctx .Context . Lnd .SignOutputRawChannel
329
331
}
330
332
331
333
if ! preimageRevealed {
@@ -345,14 +347,14 @@ func testLoopOutSuccess(ctx *testContext, amt btcutil.Amount, hash lntypes.Hash,
345
347
ctx .expiryChan <- testTime
346
348
ctx .assertPreimagePush (testPreimage )
347
349
}
348
- <- ctx .Lnd .SignOutputRawChannel
350
+ <- ctx .Context . Lnd .SignOutputRawChannel
349
351
}
350
352
351
353
// Expect client on-chain sweep of HTLC.
352
354
sweepTx := ctx .ReceiveTx ()
353
355
354
356
require .Equal (
355
- ctx .T , htlcOutpoint .Hash [:],
357
+ ctx .Context . T , htlcOutpoint .Hash [:],
356
358
sweepTx .TxIn [0 ].PreviousOutPoint .Hash [:],
357
359
"client not sweeping from htlc tx" ,
358
360
)
@@ -369,12 +371,12 @@ func testLoopOutSuccess(ctx *testContext, amt btcutil.Amount, hash lntypes.Hash,
369
371
// Check preimage.
370
372
clientPreImage := sweepTx .TxIn [0 ].Witness [preImageIndex ]
371
373
clientPreImageHash := sha256 .Sum256 (clientPreImage )
372
- require .Equal (ctx .T , hash , lntypes .Hash (clientPreImageHash ))
374
+ require .Equal (ctx .Context . T , hash , lntypes .Hash (clientPreImageHash ))
373
375
374
376
// Since we successfully published our sweep, we expect the preimage to
375
377
// have been pushed to our mock server.
376
378
preimage , err := lntypes .MakePreimage (clientPreImage )
377
- require .NoError (ctx .T , err )
379
+ require .NoError (ctx .Context . T , err )
378
380
379
381
if scriptVersion != swap .HtlcV3 {
380
382
ctx .assertPreimagePush (preimage )
0 commit comments