mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-21 14:04:36 +02:00
itest: fix RPC middleware itest
This commit is contained in:
parent
587273174e
commit
10d876ae98
@ -655,7 +655,7 @@ func (hn *HarnessNode) start(lndBinary string, lndError chan<- error,
|
||||
}
|
||||
|
||||
// Init all the RPC clients.
|
||||
hn.initRPCClients(conn)
|
||||
hn.InitRPCClients(conn)
|
||||
|
||||
if err := hn.WaitUntilStarted(); err != nil {
|
||||
return err
|
||||
@ -717,7 +717,7 @@ func (hn *HarnessNode) WaitUntilLeader(timeout time.Duration) error {
|
||||
}
|
||||
|
||||
// Init all the RPC clients.
|
||||
hn.initRPCClients(conn)
|
||||
hn.InitRPCClients(conn)
|
||||
|
||||
if err := hn.WaitUntilStarted(); err != nil {
|
||||
return err
|
||||
@ -772,7 +772,7 @@ func (hn *HarnessNode) initClientWhenReady(stateless bool,
|
||||
}
|
||||
|
||||
// Init all the RPC clients.
|
||||
hn.initRPCClients(conn)
|
||||
hn.InitRPCClients(conn)
|
||||
|
||||
return hn.initLightningClient()
|
||||
}
|
||||
@ -897,8 +897,8 @@ func (hn *HarnessNode) waitTillServerState(
|
||||
}
|
||||
}
|
||||
|
||||
// initRPCClients initializes a list of RPC clients for the node.
|
||||
func (hn *HarnessNode) initRPCClients(c *grpc.ClientConn) {
|
||||
// InitRPCClients initializes a list of RPC clients for the node.
|
||||
func (hn *HarnessNode) InitRPCClients(c *grpc.ClientConn) {
|
||||
hn.rpc = &RPCClients{
|
||||
conn: c,
|
||||
LN: lnrpc.NewLightningClient(c),
|
||||
|
@ -403,6 +403,7 @@ func middlewareMandatoryTest(t *testing.T, node *lntest.HarnessNode,
|
||||
// test case. So we need to do the wait and client setup manually here.
|
||||
conn, err := node.ConnectRPC(true)
|
||||
require.NoError(t, err)
|
||||
node.InitRPCClients(conn)
|
||||
err = node.WaitUntilStateReached(lnrpc.WalletState_RPC_ACTIVE)
|
||||
require.NoError(t, err)
|
||||
node.LightningClient = lnrpc.NewLightningClient(conn)
|
||||
|
Loading…
x
Reference in New Issue
Block a user