itest: remove direct reference to stanby nodes

Prepares the upcoming refactor. We now never call `ht.Alice` directly,
instead, we always init `alice := ht.Alice` so it's easier to see how
they are removed in a following commit.
This commit is contained in:
yyforyongyu
2024-10-26 16:24:44 +08:00
parent ef167835dd
commit 3eda87fff9
16 changed files with 157 additions and 108 deletions

View File

@@ -237,6 +237,8 @@ func testRestAPI(ht *lntest.HarnessTest) {
}
func wsTestCaseSubscription(ht *lntest.HarnessTest) {
alice := ht.Alice
// Find out the current best block so we can subscribe to the next one.
hash, height := ht.GetBestBlock()
@@ -246,7 +248,7 @@ func wsTestCaseSubscription(ht *lntest.HarnessTest) {
Height: uint32(height),
}
url := "/v2/chainnotifier/register/blocks"
c, err := openWebSocket(ht.Alice, url, "POST", req, nil)
c, err := openWebSocket(alice, url, "POST", req, nil)
require.NoError(ht, err, "websocket")
defer func() {
err := c.WriteMessage(websocket.CloseMessage, closeMsg)