lntest+itest: expore method createSimpleNetwork

So it can be used via `ht.CreateSimpleNetwork`.
This commit is contained in:
yyforyongyu
2024-10-18 02:59:46 +08:00
parent 9682aa7a78
commit 35992e1503
5 changed files with 179 additions and 74 deletions

View File

@ -41,9 +41,10 @@ func testPaymentSucceededHTLCRemoteSwept(ht *lntest.HarnessTest) {
openChannelParams := lntest.OpenChannelParams{
Amt: chanAmt,
}
cfgs := [][]string{nil, nil}
// Create a two hop network: Alice -> Bob.
chanPoints, nodes := createSimpleNetwork(ht, nil, 2, openChannelParams)
chanPoints, nodes := ht.CreateSimpleNetwork(cfgs, openChannelParams)
chanPoint := chanPoints[0]
alice, bob := nodes[0], nodes[1]
@ -197,9 +198,10 @@ func runTestPaymentHTLCTimeout(ht *lntest.HarnessTest, restartAlice bool) {
openChannelParams := lntest.OpenChannelParams{
Amt: chanAmt,
}
cfgs := [][]string{nil, nil}
// Create a two hop network: Alice -> Bob.
chanPoints, nodes := createSimpleNetwork(ht, nil, 2, openChannelParams)
chanPoints, nodes := ht.CreateSimpleNetwork(cfgs, openChannelParams)
chanPoint := chanPoints[0]
alice, bob := nodes[0], nodes[1]
@ -1247,9 +1249,10 @@ func runSendToRouteFailHTLCTimeout(ht *lntest.HarnessTest, restartAlice bool) {
openChannelParams := lntest.OpenChannelParams{
Amt: chanAmt,
}
cfgs := [][]string{nil, nil}
// Create a two hop network: Alice -> Bob.
chanPoints, nodes := createSimpleNetwork(ht, nil, 2, openChannelParams)
chanPoints, nodes := ht.CreateSimpleNetwork(cfgs, openChannelParams)
chanPoint := chanPoints[0]
alice, bob := nodes[0], nodes[1]