mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 01:43:16 +01:00
lntest+itest: fix testUpdateChanStatus
This commit is contained in:
parent
d27ff34b04
commit
7dd9a17625
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user