Skip to content

Commit

Permalink
lntest+itest: fix testUpdateChanStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
yyforyongyu committed Nov 7, 2024
1 parent a665e82 commit 24e9184
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions itest/lnd_channel_graph_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,23 @@ import (
// thus a following operation will fail if it relies on the channel being
// enabled.
func testUpdateChanStatus(ht *lntest.HarnessTest) {
// Create two fresh nodes and open a channel between them.
alice, bob := ht.Alice, ht.Bob
args := []string{
// Prepare params.
chanAmt := btcutil.Amount(100_000)
openChannelParams := lntest.OpenChannelParams{
Amt: chanAmt,
}
cfg := []string{
"--minbackoff=60s",
"--chan-enable-timeout=3s",
"--chan-disable-timeout=6s",
"--chan-status-sample-interval=0.5s",
}
ht.RestartNodeWithExtraArgs(alice, args)
ht.RestartNodeWithExtraArgs(bob, args)
ht.EnsureConnected(alice, bob)
cfgs := [][]string{cfg, cfg}

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

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

0 comments on commit 24e9184

Please sign in to comment.