refactor: move State server REST registration
This commit moves the registration of the State server with a REST proxy into the `RegisterWithRestProxy` method in order to keep all the REST registrations in one place.
This commit is contained in:
2 files changed
+10
-8
No files matched your search
@@ -901,14 +901,7 @@ func startRestProxy(cfg *Config, rpcServer *rpcServer, restDialOpts []grpc.DialO
|
||||
)
|
||||
|
||||
// Register our services with the REST proxy.
|
||||
err := lnrpc.RegisterStateHandlerFromEndpoint(
|
||||
ctx, mux, restProxyDest, restDialOpts,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = rpcServer.RegisterWithRestProxy(
|
||||
err := rpcServer.RegisterWithRestProxy(
|
||||
ctx, mux, restDialOpts, restProxyDest,
|
||||
)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user