@@ -24,6 +24,22 @@ import (
2424// TestLoopOutPaymentParameters tests the first part of the loop out process up
2525// to the point where the off-chain payments are made.
2626func TestLoopOutPaymentParameters (t * testing.T ) {
27+ t .Run ("stable protocol" , func (t * testing.T ) {
28+ testLoopOutPaymentParameters (t )
29+ })
30+
31+ t .Run ("experimental protocol" , func (t * testing.T ) {
32+ loopdb .EnableExperimentalProtocol ()
33+ defer loopdb .ResetCurrentProtocolVersion ()
34+
35+ testLoopOutPaymentParameters (t )
36+ })
37+ }
38+
39+ // TestLoopOutPaymentParameters tests the first part of the loop out process up
40+ // to the point where the off-chain payments are made.
41+ func testLoopOutPaymentParameters (t * testing.T ) {
42+
2743 defer test .Guard (t )()
2844
2945 // Set up test context objects.
@@ -144,6 +160,19 @@ func TestLoopOutPaymentParameters(t *testing.T) {
144160// TestLateHtlcPublish tests that the client is not revealing the preimage if
145161// there are not enough blocks left.
146162func TestLateHtlcPublish (t * testing.T ) {
163+ t .Run ("stable protocol" , func (t * testing.T ) {
164+ testLateHtlcPublish (t )
165+ })
166+
167+ t .Run ("experimental protocol" , func (t * testing.T ) {
168+ loopdb .EnableExperimentalProtocol ()
169+ defer loopdb .ResetCurrentProtocolVersion ()
170+
171+ testLateHtlcPublish (t )
172+ })
173+ }
174+
175+ func testLateHtlcPublish (t * testing.T ) {
147176 defer test .Guard (t )()
148177
149178 lnd := test .NewMockLnd ()
@@ -232,6 +261,19 @@ func TestLateHtlcPublish(t *testing.T) {
232261// TestCustomSweepConfTarget ensures we are able to sweep a Loop Out HTLC with a
233262// custom confirmation target.
234263func TestCustomSweepConfTarget (t * testing.T ) {
264+ t .Run ("stable protocol" , func (t * testing.T ) {
265+ testCustomSweepConfTarget (t )
266+ })
267+
268+ t .Run ("experimental protocol" , func (t * testing.T ) {
269+ loopdb .EnableExperimentalProtocol ()
270+ defer loopdb .ResetCurrentProtocolVersion ()
271+
272+ testCustomSweepConfTarget (t )
273+ })
274+ }
275+
276+ func testCustomSweepConfTarget (t * testing.T ) {
235277 defer test .Guard (t )()
236278
237279 lnd := test .NewMockLnd ()
@@ -433,6 +475,19 @@ func TestCustomSweepConfTarget(t *testing.T) {
433475// to start with a fee rate that will be too high, then progress to an
434476// acceptable one.
435477func TestPreimagePush (t * testing.T ) {
478+ t .Run ("stable protocol" , func (t * testing.T ) {
479+ testPreimagePush (t )
480+ })
481+
482+ t .Run ("experimental protocol" , func (t * testing.T ) {
483+ loopdb .EnableExperimentalProtocol ()
484+ defer loopdb .ResetCurrentProtocolVersion ()
485+
486+ testPreimagePush (t )
487+ })
488+ }
489+
490+ func testPreimagePush (t * testing.T ) {
436491 defer test .Guard (t )()
437492
438493 lnd := test .NewMockLnd ()
@@ -604,6 +659,19 @@ func TestPreimagePush(t *testing.T) {
604659// we have revealed our preimage, demonstrating that we do not reveal our
605660// preimage once we've reached our expiry height.
606661func TestExpiryBeforeReveal (t * testing.T ) {
662+ t .Run ("stable protocol" , func (t * testing.T ) {
663+ testExpiryBeforeReveal (t )
664+ })
665+
666+ t .Run ("experimental protocol" , func (t * testing.T ) {
667+ loopdb .EnableExperimentalProtocol ()
668+ defer loopdb .ResetCurrentProtocolVersion ()
669+
670+ testExpiryBeforeReveal (t )
671+ })
672+ }
673+
674+ func testExpiryBeforeReveal (t * testing.T ) {
607675 defer test .Guard (t )()
608676
609677 lnd := test .NewMockLnd ()
@@ -719,6 +787,19 @@ func TestExpiryBeforeReveal(t *testing.T) {
719787// TestFailedOffChainCancelation tests sending of a cancelation message to
720788// the server when a swap fails due to off-chain routing.
721789func TestFailedOffChainCancelation (t * testing.T ) {
790+ t .Run ("stable protocol" , func (t * testing.T ) {
791+ testFailedOffChainCancelation (t )
792+ })
793+
794+ t .Run ("experimental protocol" , func (t * testing.T ) {
795+ loopdb .EnableExperimentalProtocol ()
796+ defer loopdb .ResetCurrentProtocolVersion ()
797+
798+ testFailedOffChainCancelation (t )
799+ })
800+ }
801+
802+ func testFailedOffChainCancelation (t * testing.T ) {
722803 defer test .Guard (t )()
723804
724805 lnd := test .NewMockLnd ()
0 commit comments