Skip to content

Commit dc03637

Browse files
committed
htlcswitch: rename for test parameters for accuracy
1 parent f54c9ea commit dc03637

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

htlcswitch/link_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ func TestChannelLinkSingleHopPayment(t *testing.T) {
444444
t.Parallel()
445445

446446
// Setup a alice-bob network.
447-
alice, bob, err := createTwoClusterChannels(
447+
alice, bob, err := createMirroredChannel(
448448
t, btcutil.SatoshiPerBitcoin*3, btcutil.SatoshiPerBitcoin*5,
449449
)
450450
require.NoError(t, err, "unable to create channel")
@@ -6318,7 +6318,7 @@ func TestChannelLinkCanceledInvoice(t *testing.T) {
63186318
t.Parallel()
63196319

63206320
// Setup a alice-bob network.
6321-
alice, bob, err := createTwoClusterChannels(
6321+
alice, bob, err := createMirroredChannel(
63226322
t, btcutil.SatoshiPerBitcoin*3, btcutil.SatoshiPerBitcoin*5,
63236323
)
63246324
require.NoError(t, err, "unable to create channel")
@@ -6374,7 +6374,7 @@ type hodlInvoiceTestCtx struct {
63746374

63756375
func newHodlInvoiceTestCtx(t *testing.T) (*hodlInvoiceTestCtx, error) {
63766376
// Setup a alice-bob network.
6377-
alice, bob, err := createTwoClusterChannels(
6377+
alice, bob, err := createMirroredChannel(
63786378
t, btcutil.SatoshiPerBitcoin*3, btcutil.SatoshiPerBitcoin*5,
63796379
)
63806380
require.NoError(t, err, "unable to create channel")

htlcswitch/test_utils.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,17 +1053,17 @@ func serverOptionRejectHtlc(alice, bob, carol bool) serverOption {
10531053
}
10541054
}
10551055

1056-
// createTwoClusterChannels creates lightning channels which are needed for
1057-
// a 2 hop network cluster to be initialized.
1058-
func createTwoClusterChannels(t *testing.T, aliceToBob,
1059-
bobToCarol btcutil.Amount) (*testLightningChannel,
1056+
// createMirroredChannel creates two LightningChannel objects which represent
1057+
// the state machines on either side of a single channel between alice and bob.
1058+
func createMirroredChannel(t *testing.T, aliceToBob,
1059+
bobToAlice btcutil.Amount) (*testLightningChannel,
10601060
*testLightningChannel, error) {
10611061

10621062
_, _, firstChanID, _ := genIDs()
10631063

1064-
// Create lightning channels between Alice<->Bob and Bob<->Carol
1064+
// Create lightning channels between Alice<->Bob for Alice and Bob
10651065
alice, bob, err := createTestChannel(t, alicePrivKey, bobPrivKey,
1066-
aliceToBob, aliceToBob, 0, 0, firstChanID,
1066+
aliceToBob, bobToAlice, 0, 0, firstChanID,
10671067
)
10681068
if err != nil {
10691069
return nil, nil, errors.Errorf("unable to create "+

0 commit comments

Comments
 (0)