Skip to content

Commit

Permalink
build+routerrpc+lncli: remove routerrpc conditional compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
joostjager committed Mar 31, 2020
1 parent e11a3b2 commit ffa7bed
Show file tree
Hide file tree
Showing 17 changed files with 8 additions and 65 deletions.
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ run:
- autopilotrpc
- chainrpc
- invoicesrpc
- routerrpc
- signrpc
- walletrpc
- watchtowerrpc
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN apk add --no-cache --update alpine-sdk \
&& cd /go/src/github.com/lightningnetwork/lnd \
&& git checkout $checkout \
&& make \
&& make install tags="signrpc walletrpc chainrpc invoicesrpc routerrpc"
&& make install tags="signrpc walletrpc chainrpc invoicesrpc"

# Start a new, final image.
FROM alpine as final
Expand Down
4 changes: 2 additions & 2 deletions build/release/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ for i in $SYS; do
cd $PACKAGE-$i-$TAG

echo "Building:" $OS $ARCH $ARM
env CGO_ENABLED=0 GOOS=$OS GOARCH=$ARCH GOARM=$ARM go build -v -trimpath -ldflags="-s -w -buildid= $COMMITFLAGS" -tags="autopilotrpc signrpc walletrpc chainrpc invoicesrpc routerrpc watchtowerrpc" github.com/lightningnetwork/lnd/cmd/lnd
env CGO_ENABLED=0 GOOS=$OS GOARCH=$ARCH GOARM=$ARM go build -v -trimpath -ldflags="-s -w -buildid= $COMMITFLAGS" -tags="autopilotrpc invoicesrpc walletrpc routerrpc watchtowerrpc" github.com/lightningnetwork/lnd/cmd/lncli
env CGO_ENABLED=0 GOOS=$OS GOARCH=$ARCH GOARM=$ARM go build -v -trimpath -ldflags="-s -w -buildid= $COMMITFLAGS" -tags="autopilotrpc signrpc walletrpc chainrpc invoicesrpc watchtowerrpc" github.com/lightningnetwork/lnd/cmd/lnd
env CGO_ENABLED=0 GOOS=$OS GOARCH=$ARCH GOARM=$ARM go build -v -trimpath -ldflags="-s -w -buildid= $COMMITFLAGS" -tags="autopilotrpc invoicesrpc walletrpc watchtowerrpc" github.com/lightningnetwork/lnd/cmd/lncli
cd ..

if [[ $OS = "windows" ]]; then
Expand Down
2 changes: 0 additions & 2 deletions cmd/lncli/cmd_build_route.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build routerrpc

package main

import (
Expand Down
2 changes: 0 additions & 2 deletions cmd/lncli/cmd_query_mission_control.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build routerrpc

package main

import (
Expand Down
2 changes: 0 additions & 2 deletions cmd/lncli/cmd_query_probability.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build routerrpc

package main

import (
Expand Down
2 changes: 0 additions & 2 deletions cmd/lncli/cmd_reset_mission_control.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build routerrpc

package main

import (
Expand Down
4 changes: 1 addition & 3 deletions cmd/lncli/routerrpc_active.go → cmd/lncli/routerrpc.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// +build routerrpc

package main

import "github.com/urfave/cli"

// routerCommands will return nil for non-routerrpc builds.
// routerCommands returns a list of routerrpc commands.
func routerCommands() []cli.Command {
return []cli.Command{
queryMissionControlCommand,
Expand Down
10 changes: 0 additions & 10 deletions cmd/lncli/routerrpc_default.go

This file was deleted.

2 changes: 1 addition & 1 deletion docker/lnd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ COPY . /go/src/github.com/lightningnetwork/lnd

RUN cd /go/src/github.com/lightningnetwork/lnd \
&& make \
&& make install tags="signrpc walletrpc chainrpc invoicesrpc routerrpc"
&& make install tags="signrpc walletrpc chainrpc invoicesrpc"

# Start a new, final image to reduce size.
FROM alpine as final
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build routerrpc

package routerrpc

import (
Expand Down
28 changes: 0 additions & 28 deletions lnrpc/routerrpc/config_default.go

This file was deleted.

2 changes: 0 additions & 2 deletions lnrpc/routerrpc/driver.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build routerrpc

package routerrpc

import (
Expand Down
2 changes: 0 additions & 2 deletions lnrpc/routerrpc/router_server.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build routerrpc

package routerrpc

import (
Expand Down
2 changes: 0 additions & 2 deletions lnrpc/routerrpc/subscribe_events.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build routerrpc

package routerrpc

import (
Expand Down
2 changes: 1 addition & 1 deletion make/testing_flags.mk
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ backend = btcd
endif

# Construct the integration test command with the added build flags.
ITEST_TAGS := $(DEV_TAGS) rpctest chainrpc walletrpc signrpc invoicesrpc autopilotrpc routerrpc watchtowerrpc $(backend)
ITEST_TAGS := $(DEV_TAGS) rpctest chainrpc walletrpc signrpc invoicesrpc autopilotrpc watchtowerrpc $(backend)

ITEST := rm lntest/itest/*.log; date; $(GOTEST) -v ./lntest/itest -tags="$(ITEST_TAGS)" $(TEST_FLAGS) -logoutput -goroutinedump
4 changes: 2 additions & 2 deletions mobile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ Similar to lnd, subservers can be conditionally compiled with the build by
setting the tags argument:

```
make ios tags="routerrpc"
make ios
```

To support subservers that have APIs with name conflicts, pass the "prefix"
flag. This will add the subserver name as a prefix to each method name:

```
make ios tags="routerrpc" prefix=1
make ios prefix=1
```

### API docs
Expand Down

0 comments on commit ffa7bed

Please sign in to comment.