Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Dockerfile build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac #v4.0.0
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Build the Docker image
run: docker build -t decred/dcrlnd:$(date +%s) .

Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,18 @@ jobs:
go: ['1.24', '1.25']
steps:
- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 #5.5.0
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version: ${{ matrix.go }}

- name: Check out source
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0

- name: Install Linters
run: "go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.8"
- name: golangci-lint
uses: golangci/golangci-lint-action@0a35821d5c230e903fcfe077583637dea1b27b47 # v9.0.0
with:
install-mode: "goinstall"
version: 9f61b0f53f80672872fced07b6874397c3ed197b # v2.7.2

- name: Check golangci-lint version
run: golangci-lint --version
Expand All @@ -30,7 +33,7 @@ jobs:

- name: Lint
run: |
golangci-lint run --out-format=github-actions
golangci-lint run

- name: Package test binaries
run: |
Expand Down Expand Up @@ -60,7 +63,7 @@ jobs:
- itest-parallel-run walletimpl=remotewallet backend=spv # remote wallet spv sync
steps:
- name: Set up Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 #5.5.0
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
with:
go-version: ${{ matrix.go }}

Expand Down
56 changes: 14 additions & 42 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,29 @@
version: "2"
run:
deadline: 10m

timeout: 10m
linters:
# Skip autogenerated files for mobile and gRPC.
skip-files:
- "mobile\\/.*generated\\.go"
- "\\.pb\\.go$"
- "\\.pb\\.gw\\.go$"

disable-all: true
default: none
enable:
- asciicheck
- bidichk
- bodyclose
- errchkjson
# - exportloopref
- gofmt
- gosimple
- govet
- grouper
- ineffassign
- nosprintfhostport
- reassign
- rowserrcheck
- typecheck
- unconvert
- unused
- vetshadow

issues:
# Only show newly introduced problems.
# new-from-rev: 01f696afce2f9c0d4ed854edefa3846891d01d8a

exclude-rules:
# Exclude gosec from running for tests so that tests with weak randomness
# (math/rand) will pass the linter.
- path: _test\.go
linters:
- gosec

# Fix false positives because of build flags in itest directory.
- path: lntest/itest/.*
linters:
- unused
- deadcode
- unparam
- govet

# Ignore govet.lostcancel in integration test files. The
# integration tests make substantial use of context.WithTimeout()
# without corresponding cancel() calls, which trigger this. So
# disable these warnings for now until this is fixed upstream
# (otherwise merging upstream itest changes will become
# significantly harder)
- path: lntest/
text: lostcancel
exclusions:
rules:
- linters:
- govet
- unused
path: lntest/itest/.*
- path: lntest/
text: lostcancel
formatters:
enable:
- gofmt
1 change: 0 additions & 1 deletion build/deployment_dev.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build dev
// +build dev

package build

Expand Down
1 change: 0 additions & 1 deletion build/deployment_prod.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !dev
// +build !dev

package build

Expand Down
1 change: 0 additions & 1 deletion build/log_default.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !stdlog && !nolog && !filelog
// +build !stdlog,!nolog,!filelog

package build

Expand Down
1 change: 0 additions & 1 deletion build/log_filelog.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build filelog
// +build filelog

package build

Expand Down
1 change: 0 additions & 1 deletion build/log_nolog.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build nolog
// +build nolog

package build

Expand Down
1 change: 0 additions & 1 deletion build/log_stdlog.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build stdlog
// +build stdlog

package build

Expand Down
1 change: 0 additions & 1 deletion build/loglevel_critical.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build dev && critical
// +build dev,critical

package build

Expand Down
1 change: 0 additions & 1 deletion build/loglevel_debug.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build dev && debug
// +build dev,debug

package build

Expand Down
1 change: 0 additions & 1 deletion build/loglevel_default.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !info && !debug && !trace && !warn && !error && !critical && !off
// +build !info,!debug,!trace,!warn,!error,!critical,!off

package build

Expand Down
1 change: 0 additions & 1 deletion build/loglevel_error.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build dev && error
// +build dev,error

package build

Expand Down
1 change: 0 additions & 1 deletion build/loglevel_info.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build dev && info
// +build dev,info

package build

Expand Down
1 change: 0 additions & 1 deletion build/loglevel_off.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build dev && off
// +build dev,off

package build

Expand Down
1 change: 0 additions & 1 deletion build/loglevel_trace.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build dev && trace
// +build dev,trace

package build

Expand Down
1 change: 0 additions & 1 deletion build/loglevel_warn.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build dev && warn
// +build dev,warn

package build

Expand Down
1 change: 0 additions & 1 deletion build/version_buildinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build go1.18
// +build go1.18

package build

Expand Down
1 change: 0 additions & 1 deletion build/version_nobuildinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.

//go:build !go1.18
// +build !go1.18

package build

Expand Down
1 change: 0 additions & 1 deletion chainntnfs/chainscannotify/csnotify_dev.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build dev
// +build dev

package csnotify

Expand Down
1 change: 0 additions & 1 deletion chainntnfs/dcrdnotify/dcrd_dev.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build dev
// +build dev

package dcrdnotify

Expand Down
1 change: 0 additions & 1 deletion chainntnfs/dcrdnotify/dcrd_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build dev
// +build dev

package dcrdnotify

Expand Down
1 change: 0 additions & 1 deletion chainntnfs/interface_dev.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build dev
// +build dev

package chainntnfs

Expand Down
1 change: 0 additions & 1 deletion chainntnfs/test_utils.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build dev
// +build dev

package chainntnfs

Expand Down
4 changes: 2 additions & 2 deletions chainscan/examples/dcrwallethistorical/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ func main() {
findMore(
chainscan.SpentOutPoint(outp, scriptVer, script),
chainscan.WithFoundCallback(foundSpendCb),
chainscan.WithEndHeight(int32(bestHeight)),
chainscan.WithEndHeight(bestHeight),
)
}

target := chainscan.TargetAndOptions{
Target: chainscan.ConfirmedScript(0, script),
Options: []chainscan.Option{
chainscan.WithFoundCallback(foundCb),
chainscan.WithEndHeight(int32(bestHeight)),
chainscan.WithEndHeight(bestHeight),
},
}
targets = append(targets, target)
Expand Down
1 change: 0 additions & 1 deletion cluster/etcd_elector.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build kvdb_etcd
// +build kvdb_etcd

package cluster

Expand Down
1 change: 0 additions & 1 deletion cluster/etcd_elector_factory.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build kvdb_etcd
// +build kvdb_etcd

package cluster

Expand Down
1 change: 0 additions & 1 deletion cluster/etcd_elector_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build kvdb_etcd
// +build kvdb_etcd

package cluster

Expand Down
1 change: 0 additions & 1 deletion cmd/dcrlncli/autopilotrpc_active.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !no_autopilotrpc
// +build !no_autopilotrpc

package main

Expand Down
1 change: 0 additions & 1 deletion cmd/dcrlncli/autopilotrpc_disabled.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build no_autopilotrpc
// +build no_autopilotrpc

package main

Expand Down
1 change: 0 additions & 1 deletion cmd/dcrlncli/invoicesrpc_active.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !no_invoicesrpc
// +build !no_invoicesrpc

package main

Expand Down
1 change: 0 additions & 1 deletion cmd/dcrlncli/invoicesrpc_disabled.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build no_invoicesrpc
// +build no_invoicesrpc

package main

Expand Down
1 change: 0 additions & 1 deletion cmd/dcrlncli/walletrpc_active.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !no_walletrpc
// +build !no_walletrpc

package main

Expand Down
1 change: 0 additions & 1 deletion cmd/dcrlncli/walletrpc_disabled.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build no_walletrpc
// +build no_walletrpc

package main

Expand Down
1 change: 0 additions & 1 deletion cmd/dcrlncli/watchtower_active.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !no_watchtowerrpc
// +build !no_watchtowerrpc

package main

Expand Down
1 change: 0 additions & 1 deletion cmd/dcrlncli/watchtower_disabled.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build no_watchtowerrpc
// +build no_watchtowerrpc

package main

Expand Down
1 change: 0 additions & 1 deletion contractcourt/breacharbiter_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !rpctest
// +build !rpctest

package contractcourt

Expand Down
1 change: 0 additions & 1 deletion contractcourt/utxonursery_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//go:build !rpctest
// +build !rpctest

package contractcourt

Expand Down
24 changes: 8 additions & 16 deletions docker/dcrwallet/go.mod
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
module config

go 1.19
go 1.24.0

require (
decred.org/dcrwallet/v3 v3.0.0-20221109165347-f31e848f2697
google.golang.org/grpc v1.45.0
decred.org/dcrwallet/v5 v5.0.2
google.golang.org/grpc v1.76.0
)

require (
github.com/golang/protobuf v1.5.2 // indirect
golang.org/x/net v0.6.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
google.golang.org/protobuf v1.27.1 // indirect
)

replace (
github.com/decred/dcrd/blockchain/stake/v5 => github.com/decred/dcrd/blockchain/stake/v5 v5.0.0-20221022042529-0a0cc3b3bf92
github.com/decred/dcrd/gcs/v4 => github.com/decred/dcrd/gcs/v4 v4.0.0-20221022042529-0a0cc3b3bf92
github.com/decred/dcrd/rpc/jsonrpc/types/v4 => github.com/decred/dcrd/rpc/jsonrpc/types/v4 v4.0.0-20221022042529-0a0cc3b3bf92
github.com/decred/dcrd/rpcclient/v8 => github.com/decred/dcrd/rpcclient/v8 v8.0.0-20221022042529-0a0cc3b3bf92
golang.org/x/net v0.47.0 // indirect
golang.org/x/sys v0.38.0 // indirect
golang.org/x/text v0.31.0 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/protobuf v1.36.10 // indirect
)
Loading
Loading