walletrpc: export wallet kit sub server name

We'll want to re-use the PSBT funding functionality from the wallet kit
sub server in the main RPC server. To be able to dynamically obtain an
instance of the wallet kit server we need to know its name under which
it registers itself in the list of sub server. We export the name so we
don't have to hard code it in the main server.
This commit is contained in:
Oliver Gugger committed 2021-09-02 12:13:46 +02:00
1 parent 84035f1fb2
commit ae2e9541a4
4 files changed
+21 -14

No files matched your search

+1 -8
View File
@@ -37,13 +37,6 @@ import (
"gopkg.in/macaroon-bakery.v2/bakery"
)
const (
// subServerName is the name of the sub rpc server. We'll use this name
// to register ourselves, and we also require that the main
// SubServerConfigDispatcher instance recognize as the name of our
subServerName = "WalletKitRPC"
)
var (
// macaroonOps are the set of capabilities that our minted macaroon (if
// it doesn't already exist) will have.
@@ -256,7 +249,7 @@ func (w *WalletKit) Stop() error {
//
// NOTE: This is part of the lnrpc.SubServer interface.
func (w *WalletKit) Name() string {
return subServerName
return SubServerName
}
// RegisterWithRootServer will be called by the root gRPC server to direct a