mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-19 02:27:06 +01:00
multi: add sub-server dep
This commit is contained in:
2
.github/workflows/release.yaml
vendored
2
.github/workflows/release.yaml
vendored
@@ -94,7 +94,7 @@ jobs:
|
|||||||
|
|
||||||
Our release binaries are fully reproducible. Third parties are able to verify that the release binaries were produced properly without having to trust the release manager(s). See our [reproducible builds guide](https://github.com/lightningnetwork/lnd/tree/master/build/release) for how this can be achieved.
|
Our release binaries are fully reproducible. Third parties are able to verify that the release binaries were produced properly without having to trust the release manager(s). See our [reproducible builds guide](https://github.com/lightningnetwork/lnd/tree/master/build/release) for how this can be achieved.
|
||||||
The release binaries are compiled with `go${{ env.GO_VERSION }}`, which is required by verifiers to arrive at the same ones.
|
The release binaries are compiled with `go${{ env.GO_VERSION }}`, which is required by verifiers to arrive at the same ones.
|
||||||
They include the following build tags: `autopilotrpc`, `signrpc`, `walletrpc`, `chainrpc`, `invoicesrpc`, `routerrpc`, `watchtowerrpc` and `monitoring`. Note that these are already included in the release script, so they do not need to be provided.
|
They include the following build tags: `autopilotrpc`, `signrpc`, `walletrpc`, `chainrpc`, `invoicesrpc`, `neutrinorpc`, `routerrpc`, `watchtowerrpc` and `monitoring`. Note that these are already included in the release script, so they do not need to be provided.
|
||||||
|
|
||||||
The `make release` command can be used to ensure one rebuilds with all the same flags used for the release. If one wishes to build for only a single platform, then `make release sys=<OS-ARCH> tag=<tag>` can be used.
|
The `make release` command can be used to ensure one rebuilds with all the same flags used for the release. If one wishes to build for only a single platform, then `make release sys=<OS-ARCH> tag=<tag>` can be used.
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ run:
|
|||||||
- chainrpc
|
- chainrpc
|
||||||
- dev
|
- dev
|
||||||
- invoicesrpc
|
- invoicesrpc
|
||||||
|
- neutrinorpc
|
||||||
- peersrpc
|
- peersrpc
|
||||||
- signrpc
|
- signrpc
|
||||||
- walletrpc
|
- walletrpc
|
||||||
|
|||||||
4
Makefile
4
Makefile
@@ -306,7 +306,7 @@ apple: vendor mobile-rpc
|
|||||||
ios: vendor mobile-rpc
|
ios: vendor mobile-rpc
|
||||||
@$(call print, "Building iOS cxframework ($(IOS_BUILD)).")
|
@$(call print, "Building iOS cxframework ($(IOS_BUILD)).")
|
||||||
mkdir -p $(IOS_BUILD_DIR)
|
mkdir -p $(IOS_BUILD_DIR)
|
||||||
$(GOMOBILE_BIN) bind -target=ios,iossimulator -tags="mobile $(DEV_TAGS) autopilotrpc" $(LDFLAGS) -v -o $(IOS_BUILD) $(MOBILE_PKG)
|
$(GOMOBILE_BIN) bind -target=ios,iossimulator -tags="mobile $(DEV_TAGS) autopilotrpc neutrinorpc" $(LDFLAGS) -v -o $(IOS_BUILD) $(MOBILE_PKG)
|
||||||
|
|
||||||
macos: vendor mobile-rpc
|
macos: vendor mobile-rpc
|
||||||
@$(call print, "Building macOS cxframework ($(IOS_BUILD)).")
|
@$(call print, "Building macOS cxframework ($(IOS_BUILD)).")
|
||||||
@@ -316,7 +316,7 @@ macos: vendor mobile-rpc
|
|||||||
android: vendor mobile-rpc
|
android: vendor mobile-rpc
|
||||||
@$(call print, "Building Android library ($(ANDROID_BUILD)).")
|
@$(call print, "Building Android library ($(ANDROID_BUILD)).")
|
||||||
mkdir -p $(ANDROID_BUILD_DIR)
|
mkdir -p $(ANDROID_BUILD_DIR)
|
||||||
$(GOMOBILE_BIN) bind -target=android -tags="mobile $(DEV_TAGS) autopilotrpc" $(LDFLAGS) -v -o $(ANDROID_BUILD) $(MOBILE_PKG)
|
$(GOMOBILE_BIN) bind -target=android -tags="mobile $(DEV_TAGS) autopilotrpc neutrinorpc" $(LDFLAGS) -v -o $(ANDROID_BUILD) $(MOBILE_PKG)
|
||||||
|
|
||||||
mobile: ios android
|
mobile: ios android
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ function generate() {
|
|||||||
--custom_opt="$opts" \
|
--custom_opt="$opts" \
|
||||||
lightning.proto stateservice.proto walletunlocker.proto
|
lightning.proto stateservice.proto walletunlocker.proto
|
||||||
|
|
||||||
PACKAGES="autopilotrpc chainrpc invoicesrpc peersrpc routerrpc signrpc verrpc walletrpc watchtowerrpc wtclientrpc devrpc"
|
PACKAGES="autopilotrpc chainrpc invoicesrpc neutrinorpc peersrpc routerrpc signrpc verrpc walletrpc watchtowerrpc wtclientrpc devrpc"
|
||||||
for package in $PACKAGES; do
|
for package in $PACKAGES; do
|
||||||
# Special import for the wallet kit.
|
# Special import for the wallet kit.
|
||||||
manual_import=""
|
manual_import=""
|
||||||
|
|||||||
2
log.go
2
log.go
@@ -25,6 +25,7 @@ import (
|
|||||||
"github.com/lightningnetwork/lnd/lnrpc/chainrpc"
|
"github.com/lightningnetwork/lnd/lnrpc/chainrpc"
|
||||||
"github.com/lightningnetwork/lnd/lnrpc/devrpc"
|
"github.com/lightningnetwork/lnd/lnrpc/devrpc"
|
||||||
"github.com/lightningnetwork/lnd/lnrpc/invoicesrpc"
|
"github.com/lightningnetwork/lnd/lnrpc/invoicesrpc"
|
||||||
|
"github.com/lightningnetwork/lnd/lnrpc/neutrinorpc"
|
||||||
"github.com/lightningnetwork/lnd/lnrpc/peersrpc"
|
"github.com/lightningnetwork/lnd/lnrpc/peersrpc"
|
||||||
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
|
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
|
||||||
"github.com/lightningnetwork/lnd/lnrpc/signrpc"
|
"github.com/lightningnetwork/lnd/lnrpc/signrpc"
|
||||||
@@ -141,6 +142,7 @@ func SetupLoggers(root *build.RotatingLogWriter, interceptor signal.Interceptor)
|
|||||||
AddSubLogger(root, "SGNR", interceptor, signrpc.UseLogger)
|
AddSubLogger(root, "SGNR", interceptor, signrpc.UseLogger)
|
||||||
AddSubLogger(root, "WLKT", interceptor, walletrpc.UseLogger)
|
AddSubLogger(root, "WLKT", interceptor, walletrpc.UseLogger)
|
||||||
AddSubLogger(root, "ARPC", interceptor, autopilotrpc.UseLogger)
|
AddSubLogger(root, "ARPC", interceptor, autopilotrpc.UseLogger)
|
||||||
|
AddSubLogger(root, "NRPC", interceptor, neutrinorpc.UseLogger)
|
||||||
AddSubLogger(root, "DRPC", interceptor, devrpc.UseLogger)
|
AddSubLogger(root, "DRPC", interceptor, devrpc.UseLogger)
|
||||||
AddSubLogger(root, "INVC", interceptor, invoices.UseLogger)
|
AddSubLogger(root, "INVC", interceptor, invoices.UseLogger)
|
||||||
AddSubLogger(root, "NANN", interceptor, netann.UseLogger)
|
AddSubLogger(root, "NANN", interceptor, netann.UseLogger)
|
||||||
|
|||||||
@@ -37,9 +37,9 @@ windows-386 \
|
|||||||
windows-amd64 \
|
windows-amd64 \
|
||||||
windows-arm
|
windows-arm
|
||||||
|
|
||||||
RELEASE_TAGS = autopilotrpc signrpc walletrpc chainrpc invoicesrpc watchtowerrpc monitoring peersrpc kvdb_postgres kvdb_etcd
|
RELEASE_TAGS = autopilotrpc signrpc walletrpc chainrpc invoicesrpc watchtowerrpc neutrinorpc monitoring peersrpc kvdb_postgres kvdb_etcd
|
||||||
|
|
||||||
WASM_RELEASE_TAGS = autopilotrpc signrpc walletrpc chainrpc invoicesrpc watchtowerrpc monitoring peersrpc
|
WASM_RELEASE_TAGS = autopilotrpc signrpc walletrpc chainrpc invoicesrpc watchtowerrpc neutrinorpc monitoring peersrpc
|
||||||
|
|
||||||
# One can either specify a git tag as the version suffix or one is generated
|
# One can either specify a git tag as the version suffix or one is generated
|
||||||
# from the current date.
|
# from the current date.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
DEV_TAGS = dev
|
DEV_TAGS = dev
|
||||||
RPC_TAGS = autopilotrpc chainrpc invoicesrpc peersrpc routerrpc signrpc verrpc walletrpc watchtowerrpc wtclientrpc
|
RPC_TAGS = autopilotrpc chainrpc invoicesrpc neutrinorpc peersrpc routerrpc signrpc verrpc walletrpc watchtowerrpc wtclientrpc
|
||||||
LOG_TAGS =
|
LOG_TAGS =
|
||||||
TEST_FLAGS =
|
TEST_FLAGS =
|
||||||
ITEST_FLAGS =
|
ITEST_FLAGS =
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import (
|
|||||||
"github.com/lightningnetwork/lnd/lnrpc/chainrpc"
|
"github.com/lightningnetwork/lnd/lnrpc/chainrpc"
|
||||||
"github.com/lightningnetwork/lnd/lnrpc/devrpc"
|
"github.com/lightningnetwork/lnd/lnrpc/devrpc"
|
||||||
"github.com/lightningnetwork/lnd/lnrpc/invoicesrpc"
|
"github.com/lightningnetwork/lnd/lnrpc/invoicesrpc"
|
||||||
|
"github.com/lightningnetwork/lnd/lnrpc/neutrinorpc"
|
||||||
"github.com/lightningnetwork/lnd/lnrpc/peersrpc"
|
"github.com/lightningnetwork/lnd/lnrpc/peersrpc"
|
||||||
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
|
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
|
||||||
"github.com/lightningnetwork/lnd/lnrpc/signrpc"
|
"github.com/lightningnetwork/lnd/lnrpc/signrpc"
|
||||||
@@ -66,6 +67,10 @@ type subRPCServerConfigs struct {
|
|||||||
// as a gRPC service.
|
// as a gRPC service.
|
||||||
PeersRPC *peersrpc.Config `group:"peersrpc" namespace:"peersrpc"`
|
PeersRPC *peersrpc.Config `group:"peersrpc" namespace:"peersrpc"`
|
||||||
|
|
||||||
|
// NeutrinoKitRPC is a sub-RPC server that exposes functionality allowing
|
||||||
|
// a client to interact with a running neutrino node.
|
||||||
|
NeutrinoKitRPC *neutrinorpc.Config `group:"neutrinorpc" namespace:"neutrinorpc"`
|
||||||
|
|
||||||
// RouterRPC is a sub-RPC server the exposes functionality that allows
|
// RouterRPC is a sub-RPC server the exposes functionality that allows
|
||||||
// clients to send payments on the network, and perform Lightning
|
// clients to send payments on the network, and perform Lightning
|
||||||
// payment related queries such as requests for estimates of off-chain
|
// payment related queries such as requests for estimates of off-chain
|
||||||
@@ -250,6 +255,13 @@ func (s *subRPCServerConfigs) PopulateDependencies(cfg *Config,
|
|||||||
reflect.ValueOf(genAmpInvoiceFeatures),
|
reflect.ValueOf(genAmpInvoiceFeatures),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
case *neutrinorpc.Config:
|
||||||
|
subCfgValue := extractReflectValue(subCfg)
|
||||||
|
|
||||||
|
subCfgValue.FieldByName("NeutrinoCS").Set(
|
||||||
|
reflect.ValueOf(cc.Cfg.NeutrinoCS),
|
||||||
|
)
|
||||||
|
|
||||||
// RouterRPC isn't conditionally compiled and doesn't need to be
|
// RouterRPC isn't conditionally compiled and doesn't need to be
|
||||||
// populated using reflection.
|
// populated using reflection.
|
||||||
case *routerrpc.Config:
|
case *routerrpc.Config:
|
||||||
|
|||||||
Reference in New Issue
Block a user