Skip to content

Commit ee29cbd

Browse files
authored
Merge pull request #66 from ellemouton/lncModulesRefactor
multi: remove Pool, Loop and Faraday deps from main LNC module
2 parents 4008b92 + 34664e6 commit ee29cbd

File tree

17 files changed

+1941
-461
lines changed

17 files changed

+1941
-461
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
# go needs absolute directories, using the $HOME variable doesn't work here.
1717
GOCACHE: /home/runner/work/go/pkg/build
1818
GOPATH: /home/runner/work/go
19-
GO_VERSION: 1.17.x
19+
GO_VERSION: 1.18.x
2020

2121
jobs:
2222
########################
@@ -27,10 +27,10 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: git checkout
30-
uses: actions/checkout@v2
30+
uses: actions/checkout@v3
3131

3232
- name: go cache
33-
uses: actions/cache@v1
33+
uses: actions/cache@v3
3434
with:
3535
path: /home/runner/work/go
3636
key: lnc-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
@@ -68,13 +68,12 @@ jobs:
6868
runs-on: ubuntu-latest
6969
steps:
7070
- name: git checkout
71-
uses: actions/checkout@v2
72-
73-
- name: Fetch all history for linter
74-
run: git fetch --prune --unshallow
71+
uses: actions/checkout@v3
72+
with:
73+
fetch-depth: 0
7574

7675
- name: go cache
77-
uses: actions/cache@v1
76+
uses: actions/cache@v3
7877
with:
7978
path: /home/runner/work/go
8079
key: lnc-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
@@ -107,10 +106,10 @@ jobs:
107106
- unit-race
108107
steps:
109108
- name: git checkout
110-
uses: actions/checkout@v2
109+
uses: actions/checkout@v3
111110

112111
- name: go cache
113-
uses: actions/cache@v1
112+
uses: actions/cache@v3
114113
with:
115114
path: /home/runner/work/go
116115
key: lnc-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
@@ -136,10 +135,10 @@ jobs:
136135
runs-on: ubuntu-latest
137136
steps:
138137
- name: git checkout
139-
uses: actions/checkout@v2
138+
uses: actions/checkout@v3
140139

141140
- name: go cache
142-
uses: actions/cache@v1
141+
uses: actions/cache@v3
143142
with:
144143
path: /home/runner/work/go
145144
key: lnc-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,7 @@ linters:
4141

4242
# Gosec is outdated and reports false positives.
4343
- gosec
44+
45+
issues:
46+
# Only show newly introduced problems.
47+
new-from-rev: 4008b92d81d4d62e663025c5f79ebe44b53f283c

Dockerfile-wasm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#Get golang 1.17.3-buster as a base image
2-
FROM golang:1.17.3-buster@sha256:ee3a388a872237ddb600de3ab9512e73df0043f8878f0f355baeb5b723ef16ec as builder
1+
#Get golang 1.19 as a base image
2+
FROM golang:1.19 as builder
33

44
#Define the working directory in the container
55
WORKDIR /app

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ GOACC_PKG := github.com/ory/go-acc
77
GO_BIN := ${GOPATH}/bin
88
LINT_BIN := $(GO_BIN)/golangci-lint
99

10-
LINT_COMMIT := v1.18.0
10+
LINT_COMMIT := v1.50.0
1111

12-
DEPGET := cd /tmp && GO111MODULE=on go get -v
1312
GOBUILD := go build -v
1413
GOINSTALL := go install -v
1514
GOTEST := GO111MODULE=on go test -v
@@ -61,7 +60,7 @@ all: build check
6160

6261
$(LINT_BIN):
6362
@$(call print, "Fetching linter")
64-
$(DEPGET) $(LINT_PKG)@$(LINT_COMMIT)
63+
$(GOINSTALL) $(LINT_PKG)@$(LINT_COMMIT)
6564

6665
# ============
6766
# INSTALLATION
@@ -100,7 +99,7 @@ macos:
10099
android:
101100
@$(call print, "Building Android library ($(ANDROID_BUILD)).")
102101
mkdir -p $(ANDROID_BUILD_DIR)
103-
GOOS=js $(GOMOBILE_BIN) bind -target=android -tags="mobile $(DEV_TAGS) $(RPC_TAGS)" -androidapi 21 $(LDFLAGS_MOBILE) -v -o $(ANDROID_BUILD) $(MOBILE_PKG)
102+
cd mobile; GOOS=js $(GOMOBILE_BIN) bind -target=android -tags="mobile $(DEV_TAGS) $(RPC_TAGS)" -androidapi 21 $(LDFLAGS_MOBILE) -v -o $(ANDROID_BUILD) $(MOBILE_PKG)
104103

105104
mobile: ios android
106105

cmd/wasm-client/config.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//go:build js
2-
// +build js
32

43
package main
54

cmd/wasm-client/go.mod

Lines changed: 149 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,163 @@
11
module github.com/lightninglabs/lightning-node-connect/cmd/wasm-client
22

33
require (
4-
github.com/btcsuite/btcd/btcec/v2 v2.2.1
4+
github.com/btcsuite/btcd/btcec/v2 v2.2.2
55
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
66
github.com/golang/protobuf v1.5.2
77
github.com/jessevdk/go-flags v1.4.0
8-
github.com/lightninglabs/faraday v0.2.8-alpha.0.20220909105059-fea194ffb084
9-
github.com/lightninglabs/lightning-node-connect v0.1.9-alpha.0.20220602120524-e9964c685b18
10-
github.com/lightninglabs/loop v0.20.1-beta.0.20220916122221-9c3010150016
11-
github.com/lightninglabs/pool v0.5.8-alpha
12-
github.com/lightningnetwork/lnd v0.15.0-beta.rc6.0.20221005111311-2efc70a5c492
8+
github.com/lightninglabs/lightning-node-connect v0.1.12-alpha
9+
github.com/lightninglabs/lightning-terminal v0.8.4-alpha.0.20230111161455-fa90690c65d0
10+
github.com/lightningnetwork/lnd v0.15.5-beta
1311
google.golang.org/grpc v1.39.0
14-
gopkg.in/macaroon-bakery.v2 v2.0.1
12+
gopkg.in/macaroon-bakery.v2 v2.1.0
1513
gopkg.in/macaroon.v2 v2.1.0
1614
)
1715

16+
require (
17+
github.com/NebulousLabs/fastrand v0.0.0-20181203155948-6fb6489aac4e // indirect
18+
github.com/NebulousLabs/go-upnp v0.0.0-20180202185039-29b680b06c82 // indirect
19+
github.com/Yawning/aez v0.0.0-20211027044916-e49e68abd344 // indirect
20+
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect
21+
github.com/aead/siphash v1.0.1 // indirect
22+
github.com/andybalholm/brotli v1.0.3 // indirect
23+
github.com/beorn7/perks v1.0.1 // indirect
24+
github.com/btcsuite/btcd v0.23.4 // indirect
25+
github.com/btcsuite/btcd/btcutil v1.1.3 // indirect
26+
github.com/btcsuite/btcd/btcutil/psbt v1.1.5 // indirect
27+
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect
28+
github.com/btcsuite/btcwallet v0.16.5 // indirect
29+
github.com/btcsuite/btcwallet/wallet/txauthor v1.3.2 // indirect
30+
github.com/btcsuite/btcwallet/wallet/txrules v1.2.0 // indirect
31+
github.com/btcsuite/btcwallet/wallet/txsizes v1.2.3 // indirect
32+
github.com/btcsuite/btcwallet/walletdb v1.4.0 // indirect
33+
github.com/btcsuite/btcwallet/wtxmgr v1.5.0 // indirect
34+
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd // indirect
35+
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 // indirect
36+
github.com/btcsuite/winsvc v1.0.0 // indirect
37+
github.com/cespare/xxhash/v2 v2.1.1 // indirect
38+
github.com/coreos/go-semver v0.3.0 // indirect
39+
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
40+
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
41+
github.com/davecgh/go-spew v1.1.1 // indirect
42+
github.com/decred/dcrd/crypto/blake256 v1.0.0 // indirect
43+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
44+
github.com/decred/dcrd/lru v1.0.0 // indirect
45+
github.com/dsnet/compress v0.0.1 // indirect
46+
github.com/dustin/go-humanize v1.0.0 // indirect
47+
github.com/dvyukov/go-fuzz v0.0.0-20210602112143-b1f3d6f4ef4e // indirect
48+
github.com/fergusstrange/embedded-postgres v1.10.0 // indirect
49+
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
50+
github.com/go-errors/errors v1.0.1 // indirect
51+
github.com/gogo/protobuf v1.3.2 // indirect
52+
github.com/golang/snappy v0.0.4 // indirect
53+
github.com/google/btree v1.0.1 // indirect
54+
github.com/gorilla/websocket v1.4.2 // indirect
55+
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
56+
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
57+
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
58+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0 // indirect
59+
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
60+
github.com/jackc/pgconn v1.10.0 // indirect
61+
github.com/jackc/pgio v1.0.0 // indirect
62+
github.com/jackc/pgpassfile v1.0.0 // indirect
63+
github.com/jackc/pgproto3/v2 v2.1.1 // indirect
64+
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
65+
github.com/jackc/pgtype v1.8.1 // indirect
66+
github.com/jackc/pgx/v4 v4.13.0 // indirect
67+
github.com/jackpal/gateway v1.0.5 // indirect
68+
github.com/jackpal/go-nat-pmp v0.0.0-20170405195558-28a68d0c24ad // indirect
69+
github.com/jonboulle/clockwork v0.2.2 // indirect
70+
github.com/jrick/logrotate v1.0.0 // indirect
71+
github.com/json-iterator/go v1.1.11 // indirect
72+
github.com/juju/loggo v0.0.0-20210728185423-eebad3a902c4 // indirect
73+
github.com/kkdai/bstream v1.0.0 // indirect
74+
github.com/klauspost/compress v1.13.6 // indirect
75+
github.com/klauspost/pgzip v1.2.5 // indirect
76+
github.com/lib/pq v1.10.3 // indirect
77+
github.com/lightninglabs/faraday v0.2.9-alpha // indirect
78+
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf // indirect
79+
github.com/lightninglabs/lightning-node-connect/hashmailrpc v1.0.2 // indirect
80+
github.com/lightninglabs/loop v0.20.2-beta // indirect
81+
github.com/lightninglabs/loop/swapserverrpc v1.0.3 // indirect
82+
github.com/lightninglabs/neutrino v0.14.2 // indirect
83+
github.com/lightninglabs/pool v0.6.1-beta.0.20221202155747-aec0aee8d9a1 // indirect
84+
github.com/lightninglabs/pool/auctioneerrpc v1.1.0 // indirect
85+
github.com/lightninglabs/protobuf-hex-display v1.4.3-hex-display // indirect
86+
github.com/lightningnetwork/lightning-onion v1.0.2-0.20220211021909-bb84a1ccb0c5 // indirect
87+
github.com/lightningnetwork/lnd/cert v1.1.1 // indirect
88+
github.com/lightningnetwork/lnd/clock v1.1.0 // indirect
89+
github.com/lightningnetwork/lnd/healthcheck v1.2.2 // indirect
90+
github.com/lightningnetwork/lnd/kvdb v1.3.1 // indirect
91+
github.com/lightningnetwork/lnd/queue v1.1.0 // indirect
92+
github.com/lightningnetwork/lnd/ticker v1.1.0 // indirect
93+
github.com/lightningnetwork/lnd/tlv v1.0.3 // indirect
94+
github.com/lightningnetwork/lnd/tor v1.0.2 // indirect
95+
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 // indirect
96+
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
97+
github.com/mholt/archiver/v3 v3.5.0 // indirect
98+
github.com/miekg/dns v1.1.43 // indirect
99+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
100+
github.com/modern-go/reflect2 v1.0.1 // indirect
101+
github.com/nwaples/rardecode v1.1.2 // indirect
102+
github.com/pierrec/lz4/v4 v4.1.8 // indirect
103+
github.com/pmezard/go-difflib v1.0.0 // indirect
104+
github.com/prometheus/client_golang v1.11.0 // indirect
105+
github.com/prometheus/client_model v0.2.0 // indirect
106+
github.com/prometheus/common v0.26.0 // indirect
107+
github.com/prometheus/procfs v0.6.0 // indirect
108+
github.com/rogpeppe/fastuuid v1.2.0 // indirect
109+
github.com/sirupsen/logrus v1.7.0 // indirect
110+
github.com/soheilhy/cmux v0.1.5 // indirect
111+
github.com/spf13/pflag v1.0.5 // indirect
112+
github.com/stretchr/objx v0.4.0 // indirect
113+
github.com/stretchr/testify v1.8.0 // indirect
114+
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
115+
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect
116+
github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02 // indirect
117+
github.com/ulikunitz/xz v0.5.10 // indirect
118+
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
119+
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
120+
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec // indirect
121+
go.etcd.io/bbolt v1.3.6 // indirect
122+
go.etcd.io/etcd/api/v3 v3.5.1 // indirect
123+
go.etcd.io/etcd/client/pkg/v3 v3.5.1 // indirect
124+
go.etcd.io/etcd/client/v2 v2.305.1 // indirect
125+
go.etcd.io/etcd/client/v3 v3.5.1 // indirect
126+
go.etcd.io/etcd/pkg/v3 v3.5.1 // indirect
127+
go.etcd.io/etcd/raft/v3 v3.5.1 // indirect
128+
go.etcd.io/etcd/server/v3 v3.5.1 // indirect
129+
go.opentelemetry.io/contrib v0.20.0 // indirect
130+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0 // indirect
131+
go.opentelemetry.io/otel v0.20.0 // indirect
132+
go.opentelemetry.io/otel/exporters/otlp v0.20.0 // indirect
133+
go.opentelemetry.io/otel/metric v0.20.0 // indirect
134+
go.opentelemetry.io/otel/sdk v0.20.0 // indirect
135+
go.opentelemetry.io/otel/sdk/export/metric v0.20.0 // indirect
136+
go.opentelemetry.io/otel/sdk/metric v0.20.0 // indirect
137+
go.opentelemetry.io/otel/trace v0.20.0 // indirect
138+
go.opentelemetry.io/proto/otlp v0.7.0 // indirect
139+
go.uber.org/atomic v1.7.0 // indirect
140+
go.uber.org/multierr v1.6.0 // indirect
141+
go.uber.org/zap v1.17.0 // indirect
142+
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3 // indirect
143+
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
144+
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
145+
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
146+
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
147+
golang.org/x/text v0.3.8 // indirect
148+
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
149+
google.golang.org/genproto v0.0.0-20210617175327-b9e0b3197ced // indirect
150+
google.golang.org/protobuf v1.27.1 // indirect
151+
gopkg.in/errgo.v1 v1.0.1 // indirect
152+
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
153+
gopkg.in/yaml.v2 v2.4.0 // indirect
154+
gopkg.in/yaml.v3 v3.0.1 // indirect
155+
nhooyr.io/websocket v1.8.7 // indirect
156+
sigs.k8s.io/yaml v1.2.0 // indirect
157+
)
158+
18159
replace github.com/lightninglabs/lightning-node-connect => ../../
19160

20161
replace github.com/lightninglabs/lightning-node-connect/hashmailrpc => ../../hashmailrpc
21162

22-
go 1.16
163+
go 1.18

0 commit comments

Comments
 (0)