4545 defaultConfirmations = int32 (loopdb .DefaultLoopOutHtlcConfirmations )
4646)
4747
48- // TestSuccess tests the loop out happy flow, using a custom htlc confirmation
49- // target.
50- func TestSuccess (t * testing.T ) {
48+ // TestLoopOutSuccess tests the loop out happy flow, using a custom htlc
49+ // confirmation target.
50+ func TestLoopOutSuccess (t * testing.T ) {
5151 defer test .Guard (t )()
5252
5353 ctx := createClientTestContext (t , nil )
@@ -70,15 +70,15 @@ func TestSuccess(t *testing.T) {
7070 // Expect client to register for conf.
7171 confIntent := ctx .AssertRegisterConf (false , req .HtlcConfirmations )
7272
73- testSuccess (ctx , testRequest .Amount , info .SwapHash ,
73+ testLoopOutSuccess (ctx , testRequest .Amount , info .SwapHash ,
7474 signalPrepaymentResult , signalSwapPaymentResult , false ,
7575 confIntent , swap .HtlcV2 ,
7676 )
7777}
7878
79- // TestFailOffchain tests the handling of swap for which the server failed the
80- // payments.
81- func TestFailOffchain (t * testing.T ) {
79+ // TestLoopOutFailOffchain tests the handling of swap for which the server
80+ // failed the payments.
81+ func TestLoopOutFailOffchain (t * testing.T ) {
8282 defer test .Guard (t )()
8383
8484 ctx := createClientTestContext (t , nil )
@@ -110,8 +110,9 @@ func TestFailOffchain(t *testing.T) {
110110 ctx .finish ()
111111}
112112
113- // TestWrongAmount asserts that the client checks the server invoice amounts.
114- func TestFailWrongAmount (t * testing.T ) {
113+ // TestLoopOutWrongAmount asserts that the client checks the server invoice
114+ // amounts.
115+ func TestLoopOutFailWrongAmount (t * testing.T ) {
115116 defer test .Guard (t )()
116117
117118 test := func (t * testing.T , modifier func (* serverMock ),
@@ -148,9 +149,9 @@ func TestFailWrongAmount(t *testing.T) {
148149
149150}
150151
151- // TestResume tests that swaps in various states are properly resumed after a
152- // restart.
153- func TestResume (t * testing.T ) {
152+ // TestLoopOutResume tests that swaps in various states are properly resumed
153+ // after a restart.
154+ func TestLoopOutResume (t * testing.T ) {
154155 defer test .Guard (t )()
155156
156157 defaultConfs := loopdb .DefaultLoopOutHtlcConfirmations
@@ -165,26 +166,26 @@ func TestResume(t *testing.T) {
165166
166167 t .Run (version .String (), func (t * testing.T ) {
167168 t .Run ("not expired" , func (t * testing.T ) {
168- testResume (
169+ testLoopOutResume (
169170 t , defaultConfs , false , false , true ,
170171 version ,
171172 )
172173 })
173174 t .Run ("not expired, custom confirmations" ,
174175 func (t * testing.T ) {
175- testResume (
176+ testLoopOutResume (
176177 t , 3 , false , false , true ,
177178 version ,
178179 )
179180 })
180181 t .Run ("expired not revealed" , func (t * testing.T ) {
181- testResume (
182+ testLoopOutResume (
182183 t , defaultConfs , true , false , false ,
183184 version ,
184185 )
185186 })
186187 t .Run ("expired revealed" , func (t * testing.T ) {
187- testResume (
188+ testLoopOutResume (
188189 t , defaultConfs , true , true , true ,
189190 version ,
190191 )
@@ -193,7 +194,7 @@ func TestResume(t *testing.T) {
193194 }
194195}
195196
196- func testResume (t * testing.T , confs uint32 , expired , preimageRevealed ,
197+ func testLoopOutResume (t * testing.T , confs uint32 , expired , preimageRevealed ,
197198 expectSuccess bool , protocolVersion loopdb.ProtocolVersion ) {
198199
199200 defer test .Guard (t )()
@@ -302,15 +303,15 @@ func testResume(t *testing.T, confs uint32, expired, preimageRevealed,
302303 // Because there is no reliable payment yet, an invoice is assumed to be
303304 // paid after resume.
304305
305- testSuccess (ctx , amt , hash ,
306+ testLoopOutSuccess (ctx , amt , hash ,
306307 func (r error ) {},
307308 func (r error ) {},
308309 preimageRevealed ,
309310 confIntent , scriptVersion ,
310311 )
311312}
312313
313- func testSuccess (ctx * testContext , amt btcutil.Amount , hash lntypes.Hash ,
314+ func testLoopOutSuccess (ctx * testContext , amt btcutil.Amount , hash lntypes.Hash ,
314315 signalPrepaymentResult , signalSwapPaymentResult func (error ),
315316 preimageRevealed bool , confIntent * test.ConfRegistration ,
316317 scriptVersion swap.ScriptVersion ) {
0 commit comments