Skip to content

Commit 75f6622

Browse files
committed
itest: remove unused LEGACY channel code.
Legacy Channel types are not tested anymore via the multi-hop test harness, therefore we can remove unused code.
1 parent 07b18c1 commit 75f6622

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

itest/lnd_multi-hop_test.go

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1936,17 +1936,6 @@ func runMultiHopHtlcAggregation(ht *lntest.HarnessTest,
19361936

19371937
expectedTxes := 0
19381938
switch c {
1939-
// With the closing transaction confirmed, we should expect Bob's HTLC
1940-
// timeout transactions to be broadcast due to the expiry being reached.
1941-
// We will also expect the success transactions, since he learnt the
1942-
// preimages from Alice. We also expect Carol to sweep her commitment
1943-
// output.
1944-
case lnrpc.CommitmentType_LEGACY:
1945-
ht.AssertNumPendingSweeps(bob, numInvoices*2+1)
1946-
ht.AssertNumPendingSweeps(carol, 1)
1947-
1948-
expectedTxes = 2*numInvoices + 1
1949-
19501939
// In case of anchors, all success transactions will be aggregated into
19511940
// one, the same is the case for the timeout transactions. In this case
19521941
// Carol will also sweep her commitment and anchor output in a single
@@ -2068,12 +2057,6 @@ func runMultiHopHtlcAggregation(ht *lntest.HarnessTest,
20682057
}
20692058

20702059
switch c {
2071-
// In case this is a non-anchor channel type, we must mine 2 blocks, as
2072-
// the nursery waits an extra block before sweeping. Before the blocks
2073-
// are mined, we should expect to see Bob's commit sweep in the mempool.
2074-
case lnrpc.CommitmentType_LEGACY:
2075-
ht.MineBlocksAndAssertNumTxes(2, 1)
2076-
20772060
// Mining one additional block, Bob's second level tx is mature, and he
20782061
// can sweep the output. Before the blocks are mined, we should expect
20792062
// to see Bob's commit sweep in the mempool.
@@ -2478,11 +2461,6 @@ func runExtraPreimageFromRemoteCommit(ht *lntest.HarnessTest,
24782461
ht.AssertPaymentStatus(alice, preimage, lnrpc.Payment_SUCCEEDED)
24792462

24802463
switch c {
2481-
// For non-anchor channel type, we should expect to see Bob's commit
2482-
// sweep in the mempool.
2483-
case lnrpc.CommitmentType_LEGACY:
2484-
numTxesMempool++
2485-
24862464
// For anchor channel type, we should expect to see Bob's commit output
24872465
// and his anchor output be swept in a single tx in the mempool.
24882466
case lnrpc.CommitmentType_ANCHORS, lnrpc.CommitmentType_SIMPLE_TAPROOT:
@@ -2665,10 +2643,6 @@ func runExtraPreimageFromLocalCommit(ht *lntest.HarnessTest,
26652643
// - Bob's local output sweep tx, if this is NOT script enforced lease.
26662644
// - Carol's anchor sweep tx cannot be broadcast as it's uneconomical.
26672645
switch c {
2668-
case lnrpc.CommitmentType_LEGACY:
2669-
htlcOutpoint.Index = 0
2670-
ht.AssertNumTxsInMempool(2)
2671-
26722646
case lnrpc.CommitmentType_ANCHORS, lnrpc.CommitmentType_SIMPLE_TAPROOT:
26732647
htlcOutpoint.Index = 2
26742648
ht.AssertNumTxsInMempool(2)

0 commit comments

Comments
 (0)