lntest+itest: fix testUpdateChanStatus
This commit is contained in:
1 file changed
+11
-13
@@ -42,25 +42,23 @@ import (
|
|||||||
// thus a following operation will fail if it relies on the channel being
|
// thus a following operation will fail if it relies on the channel being
|
||||||
// enabled.
|
// enabled.
|
||||||
func testUpdateChanStatus(ht *lntest.HarnessTest) {
|
func testUpdateChanStatus(ht *lntest.HarnessTest) {
|
||||||
// Create two fresh nodes and open a channel between them.
|
// Prepare params.
|
||||||
alice, bob := ht.Alice, ht.Bob
|
chanAmt := btcutil.Amount(100_000)
|
||||||
args := []string{
|
openChannelParams := lntest.OpenChannelParams{
|
||||||
|
Amt: chanAmt,
|
||||||
|
}
|
||||||
|
cfg := []string{
|
||||||
"--minbackoff=60s",
|
"--minbackoff=60s",
|
||||||
"--chan-enable-timeout=3s",
|
"--chan-enable-timeout=3s",
|
||||||
"--chan-disable-timeout=6s",
|
"--chan-disable-timeout=6s",
|
||||||
"--chan-status-sample-interval=0.5s",
|
"--chan-status-sample-interval=0.5s",
|
||||||
}
|
}
|
||||||
ht.RestartNodeWithExtraArgs(alice, args)
|
cfgs := [][]string{cfg, cfg}
|
||||||
ht.RestartNodeWithExtraArgs(bob, args)
|
|
||||||
ht.EnsureConnected(alice, bob)
|
|
||||||
|
|
||||||
// Open a channel with 100k satoshis between Alice and Bob with Alice
|
// Create two fresh nodes and open a channel between them.
|
||||||
// being the sole funder of the channel.
|
chanPoints, nodes := ht.CreateSimpleNetwork(cfgs, openChannelParams)
|
||||||
chanAmt := btcutil.Amount(100000)
|
chanPoint := chanPoints[0]
|
||||||
chanPoint := ht.OpenChannel(
|
alice, bob := nodes[0], nodes[1]
|
||||||
alice, bob, lntest.OpenChannelParams{Amt: chanAmt},
|
|
||||||
)
|
|
||||||
defer ht.CloseChannel(alice, chanPoint)
|
|
||||||
|
|
||||||
// assertEdgeDisabled ensures that Alice has the correct Disabled state
|
// assertEdgeDisabled ensures that Alice has the correct Disabled state
|
||||||
// for given channel from her DescribeGraph.
|
// for given channel from her DescribeGraph.
|
||||||
|
|||||||
Reference in new issue
Block a user