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

@@ -13,8 +13,10 @@ func testNeutrino(ht *lntest.HarnessTest) {
ht.Skipf("skipping test for non neutrino backends")
}
alice := ht.Alice
// Check if the neutrino sub server is running.
statusRes := ht.Alice.RPC.Status(nil)
statusRes := alice.RPC.Status(nil)
require.True(ht, statusRes.Active)
require.Len(ht, statusRes.Peers, 1, "unable to find a peer")
@@ -22,11 +24,11 @@ func testNeutrino(ht *lntest.HarnessTest) {
cFilterReq := &neutrinorpc.GetCFilterRequest{
Hash: statusRes.GetBlockHash(),
}
ht.Alice.RPC.GetCFilter(cFilterReq)
alice.RPC.GetCFilter(cFilterReq)
// Try to reconnect to a connected peer.
addPeerReq := &neutrinorpc.AddPeerRequest{
PeerAddrs: statusRes.Peers[0],
}
ht.Alice.RPC.AddPeer(addPeerReq)
alice.RPC.AddPeer(addPeerReq)
}