From 953d3614774b5b0185766cc3b56b3be291696d97 Mon Sep 17 00:00:00 2001 From: Mohamed Awnallah Date: Tue, 19 Aug 2025 15:07:12 +0000 Subject: [PATCH 1/4] go.mod+golanci+workflows: bump go version to `1.24.6` --- .github/workflows/main.yml | 5 ++++- .golangci.yml | 4 ++++ go.mod | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1d9260826d..c5404db411 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,10 @@ env: GOBIN: /home/runner/work/go/bin GO111MODULE: on - GO_VERSION: 1.23.12 + # If you change this please run `make lint` to see where else it needs to be + # updated as well. + GO_VERSION: 1.24.6 + BITCOIND_VERSION: '22.0' BITCOIND_IMAGE: 'lightninglabs/bitcoin-core' diff --git a/.golangci.yml b/.golangci.yml index 5579af77a4..d86756b5d9 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,4 +1,8 @@ run: + # If you change this please run `make lint` to see where else it needs to be + # updated as well. + go: "1.24.6" + # timeout for analysis timeout: 10m diff --git a/go.mod b/go.mod index 8c0b1f9a6c..d7ebf36854 100644 --- a/go.mod +++ b/go.mod @@ -55,4 +55,6 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -go 1.22 +// If you change this please run `make lint` to see where else it needs to be +// pdated as well. +go 1.24.6 From 0596539d840f16c954f04979242a2e197a852408 Mon Sep 17 00:00:00 2001 From: Mohamed Awnallah Date: Tue, 19 Aug 2025 15:26:10 +0000 Subject: [PATCH 2/4] Makefile: update `LINT_VERSION` to match go version `1.24.6` --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 20e34a84e7..66fd6622ea 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ GOIMPORTS_BIN := $(GO_BIN)/gosimports LINT_BIN := $(GO_BIN)/golangci-lint GOACC_BIN := $(GO_BIN)/go-acc -LINT_VERSION := v1.60.1 +LINT_VERSION := v1.64.8 GOACC_VERSION := v0.2.8 GOIMPORTS_COMMIT := v0.1.10 From 5ff8d16727e277cf9c147320bb402c4e95cb6d92 Mon Sep 17 00:00:00 2001 From: Mohamed Awnallah Date: Wed, 20 Aug 2025 10:11:24 +0000 Subject: [PATCH 3/4] wallet: fix linting issues proposed by linter --- wallet/wallet.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/wallet/wallet.go b/wallet/wallet.go index b6d302b6fd..334eeda205 100644 --- a/wallet/wallet.go +++ b/wallet/wallet.go @@ -4091,7 +4091,15 @@ func (w *Wallet) DeriveFromKeyPath(scope waddrmgr.KeyScope, return fmt.Errorf("error deriving private key: %w", err) } - privKey, err = addr.(waddrmgr.ManagedPubKeyAddress).PrivKey() + mpka, ok := addr.(waddrmgr.ManagedPubKeyAddress) + if !ok { + err := fmt.Errorf("managed address type for %v is "+ + "`%T` but want waddrmgr.ManagedPubKeyAddress", + addr, addr) + + return err + } + privKey, err = mpka.PrivKey() return err }) From 24c983f4bcebbdc1633f590dda7584c6b69a60ec Mon Sep 17 00:00:00 2001 From: Mohamed Awnallah Date: Thu, 21 Aug 2025 14:54:06 +0000 Subject: [PATCH 4/4] internal: supress linting issue for now --- internal/legacy/keystore/keystore.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/legacy/keystore/keystore.go b/internal/legacy/keystore/keystore.go index 1bdd8dc4a7..1b9f5af8c3 100644 --- a/internal/legacy/keystore/keystore.go +++ b/internal/legacy/keystore/keystore.go @@ -30,7 +30,7 @@ import ( "github.com/btcsuite/btcd/wire" "github.com/btcsuite/btcwallet/internal/legacy/rename" secp "github.com/decred/dcrd/dcrec/secp256k1/v4" - "golang.org/x/crypto/ripemd160" //nolint:staticcheck + "golang.org/x/crypto/ripemd160" //nolint:staticcheck,gosec ) const (