Skip to content

Commit ffda73d

Browse files
authored
Merge pull request #209 from lightninglabs/lnd-update
[0.19] update lnd, golang version and linter
2 parents 35cb23b + 14cb1bd commit ffda73d

File tree

12 files changed

+364
-371
lines changed

12 files changed

+364
-371
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,18 @@ defaults:
1313
shell: bash
1414

1515
env:
16-
# go needs absolute directories, using the $HOME variable doesn't work here.
17-
GOCACHE: /home/runner/work/go/pkg/build
18-
GOPATH: /home/runner/work/go
19-
GO_VERSION: 1.22.x
16+
GO_VERSION: 1.23.x
2017

2118
jobs:
2219
build:
2320
name: build package, run linter
2421
runs-on: ubuntu-latest
2522
steps:
2623
- name: git checkout
27-
uses: actions/checkout@v2
28-
29-
- name: go cache
30-
uses: actions/cache@v1
31-
with:
32-
path: /home/runner/work/go
33-
key: lndclient-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
34-
restore-keys: |
35-
lndclient-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
36-
lndclient-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
37-
lndclient-${{ runner.os }}-go-${{ env.GO_VERSION }}-
38-
lndclient-${{ runner.os }}-go-
24+
uses: actions/checkout@v4
3925

4026
- name: setup go ${{ env.GO_VERSION }}
41-
uses: actions/setup-go@v2
27+
uses: actions/setup-go@v5
4228
with:
4329
go-version: '~${{ env.GO_VERSION }}'
4430

.golangci.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
run:
22
# timeout for analysis
33
timeout: 4m
4+
5+
go: "1.23"
46

57
linters-settings:
68
govet:
7-
# Don't report about shadowed variables
8-
check-shadowing: false
9+
shadow: false
910
gofmt:
1011
# simplify code: gofmt with `-s` option, true by default
1112
simplify: true
@@ -20,8 +21,8 @@ linters-settings:
2021
excludes:
2122
- G402 # Look for bad TLS connection settings.
2223
- G306 # Poor file permissions used when writing to a new file.
24+
- G115 # Integer overflow conversion.
2325
staticcheck:
24-
go: "1.18"
2526
checks: ["-SA1019"]
2627

2728
linters:
@@ -79,7 +80,6 @@ linters:
7980
- contextcheck
8081
- errname
8182
- err113
82-
- gomnd
8383
- noctx
8484
- nestif
8585
- wsl
@@ -98,6 +98,3 @@ linters:
9898
- mnd
9999
- perfsprint
100100
- inamedparam
101-
102-
# Disabled disabled because the Go version (1.21.4) of the project < 1.22.
103-
- copyloopvar

go.mod

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ require (
99
github.com/btcsuite/btclog/v2 v2.0.1-0.20250110154127-3ae4bf1cb318
1010
github.com/btcsuite/btcwallet v0.16.10-0.20241127094224-93c858b2ad63
1111
github.com/btcsuite/btcwallet/wtxmgr v1.5.4
12-
github.com/lightningnetwork/lnd v0.18.0-beta.rc4.0.20250212020202-7b294311bc96
12+
github.com/lightningnetwork/lnd v0.18.0-beta.rc4.0.20250304192711-9feb761b4ec4
1313
github.com/lightningnetwork/lnd/kvdb v1.4.12
1414
github.com/stretchr/testify v1.9.0
1515
google.golang.org/grpc v1.59.0
@@ -188,6 +188,4 @@ require (
188188
// allows us to specify that as an option.
189189
replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display
190190

191-
go 1.22.6
192-
193-
toolchain go1.22.7
191+
go 1.23.6

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,8 @@ github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display h1:pRdza2wl
437437
github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
438438
github.com/lightningnetwork/lightning-onion v1.2.1-0.20240712235311-98bd56499dfb h1:yfM05S8DXKhuCBp5qSMZdtSwvJ+GFzl94KbXMNB1JDY=
439439
github.com/lightningnetwork/lightning-onion v1.2.1-0.20240712235311-98bd56499dfb/go.mod h1:c0kvRShutpj3l6B9WtTsNTBUtjSmjZXbJd9ZBRQOSKI=
440-
github.com/lightningnetwork/lnd v0.18.0-beta.rc4.0.20250212020202-7b294311bc96 h1:J2tXuBxK2Y1LFDwtf5Ykj5djpwzVRtMnzHWIjz6dv7U=
441-
github.com/lightningnetwork/lnd v0.18.0-beta.rc4.0.20250212020202-7b294311bc96/go.mod h1:+GycbwMkhxKNcarlXvKIZ+/0Tixwxx12DERwo1z7Fn4=
440+
github.com/lightningnetwork/lnd v0.18.0-beta.rc4.0.20250304192711-9feb761b4ec4 h1:3UfT25sO71q3V7RSb/wE0ruiwk3ex30h7ZvPZ0O2Z80=
441+
github.com/lightningnetwork/lnd v0.18.0-beta.rc4.0.20250304192711-9feb761b4ec4/go.mod h1:5fYMAma+ylPOV+wycJuxSIwPLyRYRqKZTfiqk+59c+s=
442442
github.com/lightningnetwork/lnd/clock v1.1.1 h1:OfR3/zcJd2RhH0RU+zX/77c0ZiOnIMsDIBjgjWdZgA0=
443443
github.com/lightningnetwork/lnd/clock v1.1.1/go.mod h1:mGnAhPyjYZQJmebS7aevElXKTFDuO+uNFFfMXK1W8xQ=
444444
github.com/lightningnetwork/lnd/fn/v2 v2.0.8 h1:r2SLz7gZYQPVc3IZhU82M66guz3Zk2oY+Rlj9QN5S3g=

lightning_client_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ func TestLightningClientAddInvoice(t *testing.T) {
161161
}
162162

163163
for _, test := range tests {
164-
test := test
165164
t.Run(test.name, func(t *testing.T) {
166165
ln := lightningClient{
167166
client: &test.client,

lnd_services_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ func TestLndVersionCheckComparison(t *testing.T) {
154154
}
155155

156156
for _, tc := range testCases {
157-
tc := tc
158157
t.Run(tc.name, func(t *testing.T) {
159158
err := AssertVersionCompatible(
160159
tc.actual, &verrpc.Version{
@@ -311,8 +310,6 @@ func TestGetLndInfo(t *testing.T) {
311310
}
312311

313312
for _, test := range tests {
314-
test := test
315-
316313
t.Run(test.name, func(t *testing.T) {
317314
mock := newLockLndMock(
318315
test.errors, test.stateErr, test.states,

macaroon_recipes_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ func TestMacaroonRecipe(t *testing.T) {
7373

7474
// Run the test for all supported RPC packages.
7575
for pkg, numPermissions := range expectedPermissions {
76-
pkg, numPermissions := pkg, numPermissions
7776
t.Run(pkg, func(t *testing.T) {
7877
t.Parallel()
7978

router_client.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,6 @@ func (r *routerClient) ImportMissionControl(ctx context.Context,
10611061
}
10621062

10631063
for i, entry := range entries {
1064-
entry := entry
10651064
rpcEntry := &routerrpc.PairHistory{
10661065
NodeFrom: entry.NodeFrom[:],
10671066
NodeTo: entry.NodeTo[:],

tools/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.22.6-bookworm
1+
FROM golang:1.23.6-bookworm
22

33
RUN apt-get update && apt-get install -y git
44
ENV GOCACHE=/tmp/build/.cache

0 commit comments

Comments
 (0)