@@ -42,25 +42,23 @@ import (
42
42
// thus a following operation will fail if it relies on the channel being
43
43
// enabled.
44
44
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 {
48
51
"--minbackoff=60s" ,
49
52
"--chan-enable-timeout=3s" ,
50
53
"--chan-disable-timeout=6s" ,
51
54
"--chan-status-sample-interval=0.5s" ,
52
55
}
53
- ht .RestartNodeWithExtraArgs (alice , args )
54
- ht .RestartNodeWithExtraArgs (bob , args )
55
- ht .EnsureConnected (alice , bob )
56
+ cfgs := [][]string {cfg , cfg }
56
57
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 ]
64
62
65
63
// assertEdgeDisabled ensures that Alice has the correct Disabled state
66
64
// for given channel from her DescribeGraph.
0 commit comments