Skip to content

Commit

Permalink
build: update deps (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
dajohi authored Jun 20, 2023
1 parent 716e7a5 commit 54330fe
Show file tree
Hide file tree
Showing 20 changed files with 314 additions and 242 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
name: Build and Test
on: [push, pull_request]
permissions:
contents: read

jobs:
build:
name: Go CI
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.17, 1.18]
go: ['1.19', '1.20']

services:
postgres:
image: postgres:13.0
image: postgres:15.0
env:
POSTGRES_USER: dcrpooluser
POSTGRES_PASSWORD: 12345
Expand All @@ -24,13 +27,13 @@ jobs:
- 5432:5432
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 #v4.0.1
with:
go-version: ${{ matrix.go }}
- name: Check out source
uses: actions/checkout@v2
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
- name: Install Linters
run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.45.2"
run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.53.3"
- name: Build
run: go build ./...
- name: Test
Expand Down
27 changes: 27 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
run:
deadline: 10m

linters:
disable-all: true
enable:
- asciicheck
- bidichk
- bodyclose
- durationcheck
- errchkjson
- exportloopref
- gofmt
- goimports
- gosimple
- govet
- grouper
- ineffassign
- misspell
- nosprintfhostport
- reassign
- rowserrcheck
- sqlclosecheck
- tparallel
- typecheck
- unconvert
- unused
17 changes: 8 additions & 9 deletions cmd/miner/config.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019-2021 The Decred developers
// Copyright (c) 2019-2023 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.

Expand Down Expand Up @@ -215,10 +215,10 @@ func newConfigParser(cfg *config, so *serviceOptions, options flags.Options) (*f
// line options.
//
// The configuration proceeds as follows:
// 1) Start with a default config with sane settings
// 2) Pre-parse the command line to check for an alternative config file
// 3) Load configuration file overwriting defaults with any specified options
// 4) Parse CLI options and overwrite/add any specified options
// 1. Start with a default config with sane settings
// 2. Pre-parse the command line to check for an alternative config file
// 3. Load configuration file overwriting defaults with any specified options
// 4. Parse CLI options and overwrite/add any specified options
//
// The above results in dcrpool functioning properly without any config settings
// while still allowing the user to override settings with config files and
Expand Down Expand Up @@ -257,10 +257,9 @@ func loadConfig() (*config, []string, error) {
if e.Type != flags.ErrHelp {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
} else {
fmt.Fprintln(os.Stdout, err)
os.Exit(0)
}
fmt.Fprintln(os.Stdout, err)
os.Exit(0)
}
}

Expand Down Expand Up @@ -445,7 +444,7 @@ func loadConfig() (*config, []string, error) {
// Sanitize the pool address if it has the stratum prefix.
cfg.Pool = strings.Replace(cfg.Pool, "stratum+tcp://", "", 1)

// Check the pool addres is a valid address.
// Check the pool address is a valid address.
_, poolPort, err := net.SplitHostPort(cfg.Pool)
if err != nil {
str := "%s: invalid pool address, %s"
Expand Down
10 changes: 5 additions & 5 deletions config.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019-2021 The Decred developers
// Copyright (c) 2019-2023 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.

Expand Down Expand Up @@ -333,10 +333,10 @@ func normalizeAddress(addr, defaultPort string) string {
// line options.
//
// The configuration proceeds as follows:
// 1) Start with a default config with sane settings
// 2) Pre-parse the command line to check for an alternative config file
// 3) Load configuration file overwriting defaults with any specified options
// 4) Parse CLI options and overwrite/add any specified options
// 1. Start with a default config with sane settings
// 2. Pre-parse the command line to check for an alternative config file
// 3. Load configuration file overwriting defaults with any specified options
// 4. Parse CLI options and overwrite/add any specified options
//
// The above results in dcrpool functioning properly without any config settings
// while still allowing the user to override settings with config files and
Expand Down
4 changes: 2 additions & 2 deletions dcrpool.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2019-2021 The Decred developers
// Copyright (c) 2019-2023 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.

Expand All @@ -15,7 +15,7 @@ import (
"os/signal"
"runtime"

"github.com/decred/dcrd/rpcclient/v7"
"github.com/decred/dcrd/rpcclient/v8"
"github.com/decred/dcrpool/gui"
"github.com/decred/dcrpool/pool"
)
Expand Down
70 changes: 36 additions & 34 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,52 @@ module github.com/decred/dcrpool
go 1.17

require (
decred.org/dcrwallet/v2 v2.0.0-20211103180222-0b23f7aca4a1
github.com/decred/dcrd/blockchain/standalone/v2 v2.0.1-0.20210914212651-723d86274b0d
github.com/decred/dcrd/certgen v1.1.2-0.20210914212651-723d86274b0d
github.com/decred/dcrd/chaincfg/chainhash v1.0.4-0.20210914212651-723d86274b0d
github.com/decred/dcrd/chaincfg/v3 v3.0.1-0.20210914212651-723d86274b0d
github.com/decred/dcrd/crypto/blake256 v1.0.1-0.20210914212651-723d86274b0d
github.com/decred/dcrd/dcrjson/v4 v4.0.0
github.com/decred/dcrd/dcrutil/v4 v4.0.0-20211103115647-1eff7272fddf
github.com/decred/dcrd/rpc/jsonrpc/types/v3 v3.0.0-20211103115647-1eff7272fddf
github.com/decred/dcrd/rpcclient/v7 v7.0.0-20211103115647-1eff7272fddf
github.com/decred/dcrd/txscript/v4 v4.0.0-20211103115647-1eff7272fddf
github.com/decred/dcrd/wire v1.4.1-0.20210914212651-723d86274b0d
decred.org/dcrwallet/v3 v3.0.1
github.com/decred/dcrd/blockchain/standalone/v2 v2.2.0
github.com/decred/dcrd/certgen v1.1.2
github.com/decred/dcrd/chaincfg/chainhash v1.0.4
github.com/decred/dcrd/chaincfg/v3 v3.2.0
github.com/decred/dcrd/crypto/blake256 v1.0.1
github.com/decred/dcrd/dcrjson/v4 v4.0.1
github.com/decred/dcrd/dcrutil/v4 v4.0.1
github.com/decred/dcrd/rpc/jsonrpc/types/v4 v4.0.0
github.com/decred/dcrd/rpcclient/v8 v8.0.0
github.com/decred/dcrd/txscript/v4 v4.1.0
github.com/decred/dcrd/wire v1.6.0
github.com/decred/slog v1.2.0
github.com/gorilla/csrf v1.7.0
github.com/gorilla/csrf v1.7.1
github.com/gorilla/mux v1.8.0
github.com/gorilla/sessions v1.2.1
github.com/gorilla/websocket v1.4.2
github.com/jessevdk/go-flags v1.4.1-0.20200711081900-c17162fe8fd7
github.com/gorilla/websocket v1.5.0
github.com/jessevdk/go-flags v1.5.0
github.com/jrick/logrotate v1.0.0
github.com/lib/pq v1.9.0
go.etcd.io/bbolt v1.3.5
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324
google.golang.org/grpc v1.34.0
github.com/lib/pq v1.10.9
go.etcd.io/bbolt v1.3.7
golang.org/x/crypto v0.10.0
golang.org/x/time v0.3.0
google.golang.org/grpc v1.45.0
)

require (
github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412 // indirect
github.com/dchest/siphash v1.2.2 // indirect
github.com/decred/base58 v1.0.3 // indirect
github.com/decred/dcrd/blockchain/stake/v4 v4.0.0-20210914212651-723d86274b0d // indirect
github.com/decred/dcrd/crypto/ripemd160 v1.0.2-0.20210914212651-723d86274b0d // indirect
github.com/decred/dcrd/database/v3 v3.0.0-20210914212651-723d86274b0d // indirect
github.com/decred/dcrd/dcrec v1.0.1-0.20210914212651-723d86274b0d // indirect
github.com/decred/dcrd/dcrec/edwards/v2 v2.0.1 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/decred/dcrd/gcs/v3 v3.0.0-20210916172859-ca03de05ecd0 // indirect
github.com/dchest/siphash v1.2.3 // indirect
github.com/decred/base58 v1.0.5 // indirect
github.com/decred/dcrd/blockchain/stake/v5 v5.0.0 // indirect
github.com/decred/dcrd/crypto/ripemd160 v1.0.2 // indirect
github.com/decred/dcrd/database/v3 v3.0.1 // indirect
github.com/decred/dcrd/dcrec v1.0.1 // indirect
github.com/decred/dcrd/dcrec/edwards/v2 v2.0.3 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/decred/dcrd/gcs/v4 v4.0.0 // indirect
github.com/decred/go-socks v1.1.0 // indirect
github.com/golang/protobuf v1.4.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/pkg/errors v0.9.1 // indirect
golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc // indirect
golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed // indirect
golang.org/x/text v0.3.3 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/text v0.10.0 // indirect
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
google.golang.org/protobuf v1.25.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
lukechampine.com/blake3 v1.2.1 // indirect
)
Loading

0 comments on commit 54330fe

Please sign in to comment.