@@ -17,15 +17,15 @@ import (
1717 "github.com/stretchr/testify/require"
1818)
1919
20- // testSendDirectPayment creates a topology Alice->Bob and then tests that
21- // Alice can send a direct payment to Bob. This test modifies the fee estimator
22- // to return floor fee rate(1 sat/vb).
20+ // testSendDirectPayment creates a topology Alice->Bob and then tests that Alice
21+ // can send a direct payment to Bob. This test modifies the fee estimator to
22+ // return floor fee rate(1 sat/vb).
2323func testSendDirectPayment (ht * lntest.HarnessTest ) {
2424 // Grab Alice and Bob's nodes for convenience.
2525 alice , bob := ht .Alice , ht .Bob
2626
2727 // Create a list of commitment types we want to test.
28- commitTyes := []lnrpc.CommitmentType {
28+ commitmentTypes := []lnrpc.CommitmentType {
2929 lnrpc .CommitmentType_ANCHORS ,
3030 lnrpc .CommitmentType_SIMPLE_TAPROOT ,
3131 }
@@ -109,7 +109,7 @@ func testSendDirectPayment(ht *lntest.HarnessTest) {
109109 }
110110
111111 // Run the test cases.
112- for _ , ct := range commitTyes {
112+ for _ , ct := range commitmentTypes {
113113 ht .Run (ct .String (), func (t * testing.T ) {
114114 st := ht .Subtest (t )
115115
@@ -132,8 +132,9 @@ func testSendDirectPayment(ht *lntest.HarnessTest) {
132132 }
133133
134134 // Open private channel for taproot channels.
135- params .Private = ct ==
136- lnrpc .CommitmentType_SIMPLE_TAPROOT
135+ if ct == lnrpc .CommitmentType_SIMPLE_TAPROOT {
136+ params .Private = true
137+ }
137138
138139 testSendPayment (st , params )
139140 })
@@ -429,7 +430,7 @@ func runAsyncPayments(ht *lntest.HarnessTest, alice, bob *node.HarnessNode,
429430 // likely be lower, but we can't guarantee that any more HTLCs will
430431 // succeed due to the limited path diversity and inability of the router
431432 // to retry via another path.
432- numInvoices := int ( input .MaxHTLCNumber / 2 )
433+ numInvoices := input .MaxHTLCNumber / 2
433434
434435 bobAmt := int64 (numInvoices * paymentAmt )
435436 aliceAmt := info .LocalBalance - bobAmt
@@ -534,10 +535,10 @@ func testBidirectionalAsyncPayments(ht *lntest.HarnessTest) {
534535
535536 // We'll create a number of invoices equal the max number of HTLCs that
536537 // can be carried in one direction. The number on the commitment will
537- // likely be lower, but we can't guarantee that any more HTLCs will
538- // succeed due to the limited path diversity and inability of the router
539- // to retry via another path.
540- numInvoices := int ( input .MaxHTLCNumber / 2 )
538+ // likely be lower, but we can't guarantee that more HTLCs will succeed
539+ // due to the limited path diversity and inability of the router to
540+ // retry via another path.
541+ numInvoices := input .MaxHTLCNumber / 2
541542
542543 // Nodes should exchange the same amount of money and because of this
543544 // at the end balances should remain the same.
@@ -597,7 +598,7 @@ func testBidirectionalAsyncPayments(ht *lntest.HarnessTest) {
597598 assertChannelState (ht , alice , chanPoint , aliceAmt , bobAmt )
598599
599600 // Next query for Bob's and Alice's channel states, in order to confirm
600- // that all payment have been successful transmitted.
601+ // that all payment have been successfully transmitted.
601602 assertChannelState (ht , bob , chanPoint , bobAmt , aliceAmt )
602603
603604 // Finally, immediately close the channel. This function will also
@@ -662,7 +663,7 @@ func testInvoiceSubscriptions(ht *lntest.HarnessTest) {
662663
663664 // Now that the set of invoices has been added, we'll re-register for
664665 // streaming invoice notifications for Bob, this time specifying the
665- // add invoice of the last prior invoice.
666+ // add index of the last prior invoice.
666667 req = & lnrpc.InvoiceSubscription {AddIndex : lastAddIndex }
667668 bobInvoiceSubscription = bob .RPC .SubscribeInvoices (req )
668669
0 commit comments