multi: add watchtower client RPC subserver

This commit is contained in:
Wilmer Paulino committed 2019-07-30 15:18:15 -07:00
1 parent c57128097e
commit 8f010abac5
13 files changed
+1646 -8

No files matched your search

+1 -1
View File
@@ -7677,7 +7677,7 @@ func testRevokedCloseRetributionAltruistWatchtower(net *lntest.NetworkHarness,
defer shutdownAndAssert(net, t, willy)
ctxt, _ := context.WithTimeout(ctxb, defaultTimeout)
willyInfo, err := willy.WatchtowerClient.GetInfo(
willyInfo, err := willy.Watchtower.GetInfo(
ctxt, &watchtowerrpc.GetInfoRequest{},
)
if err != nil {
+7 -3
View File
@@ -26,11 +26,12 @@ import (
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
"github.com/lightningnetwork/lnd/lnrpc/walletrpc"
"github.com/lightningnetwork/lnd/lnrpc/watchtowerrpc"
"github.com/lightningnetwork/lnd/lnrpc/wtclientrpc"
"github.com/lightningnetwork/lnd/macaroons"
"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
macaroon "gopkg.in/macaroon.v2"
"gopkg.in/macaroon.v2"
)
const (
@@ -265,7 +266,8 @@ type HarnessNode struct {
// because a name collision would occur with LightningClient.
RouterClient routerrpc.RouterClient
WalletKitClient walletrpc.WalletKitClient
WatchtowerClient watchtowerrpc.WatchtowerClient
Watchtower watchtowerrpc.WatchtowerClient
WatchtowerClient wtclientrpc.WatchtowerClientClient
}
// Assert *HarnessNode implements the lnrpc.LightningClient interface.
@@ -526,7 +528,8 @@ 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)
hn.Watchtower = watchtowerrpc.NewWatchtowerClient(conn)
hn.WatchtowerClient = wtclientrpc.NewWatchtowerClientClient(conn)
// Set the harness node's pubkey to what the node claims in GetInfo.
err := hn.FetchNodeInfo()
@@ -729,6 +732,7 @@ func (hn *HarnessNode) stop() error {
hn.processExit = nil
hn.LightningClient = nil
hn.WalletUnlockerClient = nil
hn.Watchtower = nil
hn.WatchtowerClient = nil
return nil
}