itest: remove the use of standby nodes

This commit removes the usage of the standby nodes and uses
`CreateSimpleNetwork` when applicable. Also introduces a helper method
`NewNodeWithCoins` to quickly start a node with funds.
This commit is contained in:
yyforyongyu committed 2024-12-20 19:38:05 +08:00
1 parent 3eda87fff9
commit de8f14bed2
44 files changed
+321 -250

No files matched your search

+5 -8
View File
@@ -13,8 +13,6 @@ import (
// sets. For completeness, it also asserts that features aren't set in places
// where they aren't intended to be.
func testCustomFeatures(ht *lntest.HarnessTest) {
alice, bob := ht.Alice, ht.Bob
var (
// Odd custom features so that we don't need to worry about
// issues connecting to peers.
@@ -29,14 +27,13 @@ func testCustomFeatures(ht *lntest.HarnessTest) {
fmt.Sprintf("--protocol.custom-nodeann=%v", customNodeAnn),
fmt.Sprintf("--protocol.custom-invoice=%v", customInvoice),
}
ht.RestartNodeWithExtraArgs(alice, extraArgs)
cfgs := [][]string{extraArgs, nil}
// Connect nodes and open a channel so that Alice will be included
// in Bob's graph.
ht.ConnectNodes(alice, bob)
chanPoint := ht.OpenChannel(
alice, bob, lntest.OpenChannelParams{Amt: 1000000},
chanPoints, nodes := ht.CreateSimpleNetwork(
cfgs, lntest.OpenChannelParams{Amt: 1000000},
)
alice, bob := nodes[0], nodes[1]
chanPoint := chanPoints[0]
// Check that Alice's custom feature bit was sent to Bob in her init
// message.