Skip to content

Commit 24e9184

Browse files
committed
lntest+itest: fix testUpdateChanStatus
1 parent a665e82 commit 24e9184

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

Diff for: itest/lnd_channel_graph_test.go

+11-13
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,23 @@ import (
4242
// thus a following operation will fail if it relies on the channel being
4343
// enabled.
4444
func testUpdateChanStatus(ht *lntest.HarnessTest) {
45-
// Create two fresh nodes and open a channel between them.
46-
alice, bob := ht.Alice, ht.Bob
47-
args := []string{
45+
// Prepare params.
46+
chanAmt := btcutil.Amount(100_000)
47+
openChannelParams := lntest.OpenChannelParams{
48+
Amt: chanAmt,
49+
}
50+
cfg := []string{
4851
"--minbackoff=60s",
4952
"--chan-enable-timeout=3s",
5053
"--chan-disable-timeout=6s",
5154
"--chan-status-sample-interval=0.5s",
5255
}
53-
ht.RestartNodeWithExtraArgs(alice, args)
54-
ht.RestartNodeWithExtraArgs(bob, args)
55-
ht.EnsureConnected(alice, bob)
56+
cfgs := [][]string{cfg, cfg}
5657

57-
// Open a channel with 100k satoshis between Alice and Bob with Alice
58-
// being the sole funder of the channel.
59-
chanAmt := btcutil.Amount(100000)
60-
chanPoint := ht.OpenChannel(
61-
alice, bob, lntest.OpenChannelParams{Amt: chanAmt},
62-
)
63-
defer ht.CloseChannel(alice, chanPoint)
58+
// Create two fresh nodes and open a channel between them.
59+
chanPoints, nodes := ht.CreateSimpleNetwork(cfgs, openChannelParams)
60+
chanPoint := chanPoints[0]
61+
alice, bob := nodes[0], nodes[1]
6462

6563
// assertEdgeDisabled ensures that Alice has the correct Disabled state
6664
// for given channel from her DescribeGraph.

0 commit comments

Comments
 (0)