diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 496484ad..3dc9064f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go: [1.12, 1.13] + go: [1.13, 1.14] steps: - name: Set up Go uses: actions/setup-go@v1 @@ -15,7 +15,7 @@ jobs: - name: Check out source uses: actions/checkout@v1 - name: Install Linters - run: "curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.21.0" + run: "curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.24.0" - name: Build env: GO111MODULE: "on" diff --git a/LICENSE b/LICENSE index d344077b..9c250002 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ Copyright (c) 2013-2016 The btcsuite developers -Copyright (c) 2015-2019 The Decred developers +Copyright (c) 2015-2020 The Decred developers Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/go.mod b/go.mod index bcaea3dc..13ecae8e 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/decred/dcrpool go 1.12 require ( - github.com/coreos/bbolt v1.3.3 github.com/davecgh/go-spew v1.1.1 github.com/decred/base58 v1.0.2 // indirect github.com/decred/dcrd/blockchain/standalone v1.1.0 @@ -24,6 +23,7 @@ require ( github.com/gorilla/websocket v1.4.1 github.com/jessevdk/go-flags v1.4.0 github.com/jrick/logrotate v1.0.0 + go.etcd.io/bbolt v1.3.4 golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413 golang.org/x/time v0.0.0-20191024005414-555d28b269f0 google.golang.org/grpc v1.26.0 diff --git a/go.sum b/go.sum index dde1b332..720581a4 100644 --- a/go.sum +++ b/go.sum @@ -9,8 +9,6 @@ github.com/btcsuite/snappy-go v1.0.0 h1:ZxaA6lo2EpxGddsA8JwWOcxlzRybb444sgmeJQMJ github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/coreos/bbolt v1.3.3 h1:n6AiVyVRKQFNb6mJlwESEvvLoDyiTzXX7ORAUlkeBdY= -github.com/coreos/bbolt v1.3.3/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -148,8 +146,9 @@ github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.4 h1:hi1bXHMVrlQh6WwxAy+qZCV/SYIlqo+Ushwdpa4tAKg= +go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -180,6 +179,8 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47 h1:/XfQ9z7ib8eEJX2hdgFTZJ/ntt0swNk5oYBziWeTCvY= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5 h1:LfCXLvNmTYH9kEmVgqbnsWfruoXZIrh4YBgqVHtDvw0= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= diff --git a/pool/acceptedwork.go b/pool/acceptedwork.go index c7e79ebe..39f6395b 100644 --- a/pool/acceptedwork.go +++ b/pool/acceptedwork.go @@ -12,7 +12,7 @@ import ( "strings" "time" - bolt "github.com/coreos/bbolt" + bolt "go.etcd.io/bbolt" ) // AcceptedWork represents an accepted work submission to the network. diff --git a/pool/acceptedwork_test.go b/pool/acceptedwork_test.go index 41cc586d..8058e0bb 100644 --- a/pool/acceptedwork_test.go +++ b/pool/acceptedwork_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - bolt "github.com/coreos/bbolt" + bolt "go.etcd.io/bbolt" ) func persistAcceptedWork(db *bolt.DB, blockHash string, prevHash string, diff --git a/pool/account.go b/pool/account.go index 53b2f86b..ba632dd8 100644 --- a/pool/account.go +++ b/pool/account.go @@ -10,10 +10,10 @@ import ( "fmt" "time" - bolt "github.com/coreos/bbolt" "github.com/decred/dcrd/chaincfg/v2" "github.com/decred/dcrd/crypto/blake256" "github.com/decred/dcrd/dcrutil/v2" + bolt "go.etcd.io/bbolt" ) // Account represents a mining pool account. diff --git a/pool/account_test.go b/pool/account_test.go index fb78605b..fe90259a 100644 --- a/pool/account_test.go +++ b/pool/account_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - bolt "github.com/coreos/bbolt" "github.com/decred/dcrd/chaincfg/v2" + bolt "go.etcd.io/bbolt" ) func persistAccount(db *bolt.DB, address string, activeNet *chaincfg.Params) (*Account, error) { diff --git a/pool/chainstate.go b/pool/chainstate.go index 5ac34652..115abb66 100644 --- a/pool/chainstate.go +++ b/pool/chainstate.go @@ -5,10 +5,10 @@ import ( "sync" "sync/atomic" - bolt "github.com/coreos/bbolt" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/dcrutil/v2" "github.com/decred/dcrd/wire" + bolt "go.etcd.io/bbolt" ) var ( diff --git a/pool/chainstate_test.go b/pool/chainstate_test.go index b718ce22..695d312b 100644 --- a/pool/chainstate_test.go +++ b/pool/chainstate_test.go @@ -6,10 +6,10 @@ import ( "sync" "testing" - bolt "github.com/coreos/bbolt" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/dcrutil/v2" "github.com/decred/dcrd/wire" + bolt "go.etcd.io/bbolt" ) func testChainState(t *testing.T, db *bolt.DB) { diff --git a/pool/client.go b/pool/client.go index a3d49cda..56f1dc4f 100644 --- a/pool/client.go +++ b/pool/client.go @@ -21,11 +21,11 @@ import ( "sync/atomic" "time" - bolt "github.com/coreos/bbolt" "github.com/davecgh/go-spew/spew" "github.com/decred/dcrd/blockchain/standalone" "github.com/decred/dcrd/chaincfg/v2" "github.com/decred/dcrd/wire" + bolt "go.etcd.io/bbolt" ) const ( diff --git a/pool/client_test.go b/pool/client_test.go index 9e0e14fc..85aed923 100644 --- a/pool/client_test.go +++ b/pool/client_test.go @@ -16,8 +16,8 @@ import ( "testing" "time" - bolt "github.com/coreos/bbolt" "github.com/decred/dcrd/chaincfg/v2" + bolt "go.etcd.io/bbolt" ) func testClient(t *testing.T, db *bolt.DB) { diff --git a/pool/db.go b/pool/db.go index 3657960f..84e6c81e 100644 --- a/pool/db.go +++ b/pool/db.go @@ -9,7 +9,7 @@ import ( "fmt" "time" - bolt "github.com/coreos/bbolt" + bolt "go.etcd.io/bbolt" ) var ( diff --git a/pool/db_test.go b/pool/db_test.go index 02ef0d12..9dc1cc30 100644 --- a/pool/db_test.go +++ b/pool/db_test.go @@ -5,8 +5,8 @@ import ( "os" "testing" - bolt "github.com/coreos/bbolt" "github.com/decred/dcrd/chaincfg/v2" + bolt "go.etcd.io/bbolt" ) func testInitDB(t *testing.T) { diff --git a/pool/endpoint.go b/pool/endpoint.go index 859722da..0bea1df5 100644 --- a/pool/endpoint.go +++ b/pool/endpoint.go @@ -12,8 +12,8 @@ import ( "sync" "time" - bolt "github.com/coreos/bbolt" "github.com/decred/dcrd/chaincfg/v2" + bolt "go.etcd.io/bbolt" ) type EndpointConfig struct { diff --git a/pool/endpoint_test.go b/pool/endpoint_test.go index e9aa9ac9..f1b2e571 100644 --- a/pool/endpoint_test.go +++ b/pool/endpoint_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" - bolt "github.com/coreos/bbolt" "github.com/decred/dcrd/chaincfg/v2" + bolt "go.etcd.io/bbolt" ) func makeConn(listener *net.TCPListener, serverCh chan net.Conn) (net.Conn, net.Conn, error) { diff --git a/pool/hub.go b/pool/hub.go index 04fb0e7c..51d44043 100644 --- a/pool/hub.go +++ b/pool/hub.go @@ -18,13 +18,13 @@ import ( "sync/atomic" "time" - bolt "github.com/coreos/bbolt" "github.com/decred/dcrd/chaincfg/chainhash" "github.com/decred/dcrd/chaincfg/v2" "github.com/decred/dcrd/dcrutil/v2" "github.com/decred/dcrd/rpcclient/v5" "github.com/decred/dcrd/wire" "github.com/decred/dcrwallet/rpc/walletrpc" + bolt "go.etcd.io/bbolt" "google.golang.org/grpc" "google.golang.org/grpc/credentials" ) diff --git a/pool/hub_test.go b/pool/hub_test.go index c8721659..efc94821 100644 --- a/pool/hub_test.go +++ b/pool/hub_test.go @@ -12,9 +12,9 @@ import ( "testing" "time" - bolt "github.com/coreos/bbolt" "github.com/decred/dcrd/chaincfg/v2" "github.com/decred/dcrd/dcrutil/v2" + bolt "go.etcd.io/bbolt" ) func testHub(t *testing.T, db *bolt.DB) { diff --git a/pool/job.go b/pool/job.go index 03b378c1..ee373d63 100644 --- a/pool/job.go +++ b/pool/job.go @@ -12,7 +12,7 @@ import ( "fmt" "time" - bolt "github.com/coreos/bbolt" + bolt "go.etcd.io/bbolt" ) // Job represents cached copies of work delivered to clients. diff --git a/pool/job_test.go b/pool/job_test.go index 073fea1b..15f0bdee 100644 --- a/pool/job_test.go +++ b/pool/job_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - bolt "github.com/coreos/bbolt" + bolt "go.etcd.io/bbolt" ) func persistJob(db *bolt.DB, header string, height uint32) (*Job, error) { diff --git a/pool/payment.go b/pool/payment.go index a1ab3f40..b81a415d 100644 --- a/pool/payment.go +++ b/pool/payment.go @@ -11,8 +11,8 @@ import ( "fmt" "time" - bolt "github.com/coreos/bbolt" "github.com/decred/dcrd/dcrutil/v2" + bolt "go.etcd.io/bbolt" ) // Payment represents an outstanding payment for a pool account. diff --git a/pool/payment_test.go b/pool/payment_test.go index 6c4004ed..eb746bf6 100644 --- a/pool/payment_test.go +++ b/pool/payment_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" - bolt "github.com/coreos/bbolt" "github.com/decred/dcrd/dcrutil/v2" + bolt "go.etcd.io/bbolt" ) // makePaymentBundle creates a new payment bundle. diff --git a/pool/paymentmgr.go b/pool/paymentmgr.go index dc0d3066..efd9df01 100644 --- a/pool/paymentmgr.go +++ b/pool/paymentmgr.go @@ -9,11 +9,11 @@ import ( "sync/atomic" "time" - bolt "github.com/coreos/bbolt" "github.com/decred/dcrd/chaincfg/v2" "github.com/decred/dcrd/dcrutil/v2" "github.com/decred/dcrd/mempool/v3" txrules "github.com/decred/dcrwallet/wallet/v3/txrules" + bolt "go.etcd.io/bbolt" ) type PaymentMgrConfig struct { diff --git a/pool/paymentmgr_test.go b/pool/paymentmgr_test.go index b825020a..0a89f149 100644 --- a/pool/paymentmgr_test.go +++ b/pool/paymentmgr_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - bolt "github.com/coreos/bbolt" "github.com/decred/dcrd/chaincfg/v2" "github.com/decred/dcrd/dcrutil/v2" + bolt "go.etcd.io/bbolt" ) func testPaymentMgr(t *testing.T, db *bolt.DB) { diff --git a/pool/pool_test.go b/pool/pool_test.go index ab2e00f3..a4af2f2a 100644 --- a/pool/pool_test.go +++ b/pool/pool_test.go @@ -4,9 +4,9 @@ import ( "os" "testing" - bolt "github.com/coreos/bbolt" "github.com/decred/dcrd/chaincfg/v2" "github.com/decred/dcrd/dcrutil/v2" + bolt "go.etcd.io/bbolt" ) var ( diff --git a/pool/share.go b/pool/share.go index 244f988f..120352d7 100644 --- a/pool/share.go +++ b/pool/share.go @@ -12,9 +12,9 @@ import ( "math/big" "time" - bolt "github.com/coreos/bbolt" "github.com/decred/dcrd/chaincfg/v2" "github.com/decred/dcrd/dcrutil/v2" + bolt "go.etcd.io/bbolt" ) var ( diff --git a/pool/share_test.go b/pool/share_test.go index e83883fa..a7210db4 100644 --- a/pool/share_test.go +++ b/pool/share_test.go @@ -10,8 +10,8 @@ import ( "testing" "time" - bolt "github.com/coreos/bbolt" "github.com/decred/dcrd/chaincfg/v2" + bolt "go.etcd.io/bbolt" ) // persistShare creates a persisted share with the provided account, share diff --git a/pool/upgrades.go b/pool/upgrades.go index 843292ca..d5b762b2 100644 --- a/pool/upgrades.go +++ b/pool/upgrades.go @@ -5,7 +5,7 @@ import ( "encoding/json" "fmt" - bolt "github.com/coreos/bbolt" + bolt "go.etcd.io/bbolt" ) const ( diff --git a/pool/upgrades_test.go b/pool/upgrades_test.go index 9f7ed0b9..f50b7ac5 100644 --- a/pool/upgrades_test.go +++ b/pool/upgrades_test.go @@ -9,7 +9,7 @@ import ( "path/filepath" "testing" - bolt "github.com/coreos/bbolt" + bolt "go.etcd.io/bbolt" ) var dbUpgradeTests = [...]struct {