From f7da87acc40bd57aee647f0cb2fa811e58c306af Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Thu, 20 Jun 2019 16:55:13 -0700 Subject: [PATCH] lntest+make: build w/ watchtowerrpc tag, add grpc client to harness --- lntest/node.go | 12 ++++++++---- make/testing_flags.mk | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lntest/node.go b/lntest/node.go index 9205658a8..b5f55e876 100644 --- a/lntest/node.go +++ b/lntest/node.go @@ -25,6 +25,7 @@ import ( "github.com/lightningnetwork/lnd/lnrpc/invoicesrpc" "github.com/lightningnetwork/lnd/lnrpc/routerrpc" "github.com/lightningnetwork/lnd/lnrpc/walletrpc" + "github.com/lightningnetwork/lnd/lnrpc/watchtowerrpc" "github.com/lightningnetwork/lnd/macaroons" "golang.org/x/net/context" "google.golang.org/grpc" @@ -250,10 +251,11 @@ type HarnessNode struct { invoicesrpc.InvoicesClient - // RouterClient and WalletKitClient cannot be embedded, because a name - // collision would occur with LightningClient. - RouterClient routerrpc.RouterClient - WalletKitClient walletrpc.WalletKitClient + // RouterClient, WalletKitClient, WatchtowerClient cannot be embedded, + // because a name collision would occur with LightningClient. + RouterClient routerrpc.RouterClient + WalletKitClient walletrpc.WalletKitClient + WatchtowerClient watchtowerrpc.WatchtowerClient } // Assert *HarnessNode implements the lnrpc.LightningClient interface. @@ -515,6 +517,7 @@ func (hn *HarnessNode) initLightningClient(conn *grpc.ClientConn) error { hn.InvoicesClient = invoicesrpc.NewInvoicesClient(conn) hn.RouterClient = routerrpc.NewRouterClient(conn) hn.WalletKitClient = walletrpc.NewWalletKitClient(conn) + hn.WatchtowerClient = watchtowerrpc.NewWatchtowerClient(conn) // Set the harness node's pubkey to what the node claims in GetInfo. err := hn.FetchNodeInfo() @@ -717,6 +720,7 @@ func (hn *HarnessNode) stop() error { hn.processExit = nil hn.LightningClient = nil hn.WalletUnlockerClient = nil + hn.WatchtowerClient = nil return nil } diff --git a/make/testing_flags.mk b/make/testing_flags.mk index d947803a4..feea946e2 100644 --- a/make/testing_flags.mk +++ b/make/testing_flags.mk @@ -56,7 +56,7 @@ endif # Construct the integration test command with the added build flags. -ITEST_TAGS := $(DEV_TAGS) rpctest chainrpc walletrpc signrpc invoicesrpc autopilotrpc routerrpc +ITEST_TAGS := $(DEV_TAGS) rpctest chainrpc walletrpc signrpc invoicesrpc autopilotrpc routerrpc watchtowerrpc # Default to btcd backend if not set. ifneq ($(backend),)