multi: Underscore unused func params.
This commit is contained in:
parent
1b9587c000
commit
cf8f791684
@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2022-2023 The Decred developers
|
// Copyright (c) 2022-2024 The Decred developers
|
||||||
// Use of this source code is governed by an ISC
|
// Use of this source code is governed by an ISC
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ func TestErrorDetails(t *testing.T) {
|
|||||||
for testName, testData := range tests {
|
for testName, testData := range tests {
|
||||||
t.Run(testName, func(t *testing.T) {
|
t.Run(testName, func(t *testing.T) {
|
||||||
|
|
||||||
testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
|
testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, _ *http.Request) {
|
||||||
res.WriteHeader(testData.respHTTPStatus)
|
res.WriteHeader(testData.respHTTPStatus)
|
||||||
_, err := res.Write(testData.respBodyBytes)
|
_, err := res.Write(testData.respBodyBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -156,7 +156,7 @@ func TestSignatureValidation(t *testing.T) {
|
|||||||
for testName, testData := range tests {
|
for testName, testData := range tests {
|
||||||
t.Run(testName, func(t *testing.T) {
|
t.Run(testName, func(t *testing.T) {
|
||||||
|
|
||||||
testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
|
testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, _ *http.Request) {
|
||||||
res.Header().Add("VSP-Server-Signature", testData.responseSig)
|
res.Header().Add("VSP-Server-Signature", testData.responseSig)
|
||||||
res.WriteHeader(http.StatusOK)
|
res.WriteHeader(http.StatusOK)
|
||||||
_, err := res.Write(emptyJSON)
|
_, err := res.Write(emptyJSON)
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2020-2023 The Decred developers
|
// Copyright (c) 2020-2024 The Decred developers
|
||||||
// Use of this source code is governed by an ISC
|
// Use of this source code is governed by an ISC
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ func testFilterTickets(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Expect all tickets returned.
|
// Expect all tickets returned.
|
||||||
retrieved, err := db.filterTickets(func(t *bolt.Bucket) bool {
|
retrieved, err := db.filterTickets(func(_ *bolt.Bucket) bool {
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2021-2022 The Decred developers
|
// Copyright (c) 2021-2024 The Decred developers
|
||||||
// Use of this source code is governed by an ISC
|
// Use of this source code is governed by an ISC
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ func ticketBucketUpgrade(db *bolt.DB, log slog.Logger) error {
|
|||||||
|
|
||||||
// Count tickets so migration progress can be logged.
|
// Count tickets so migration progress can be logged.
|
||||||
todo := 0
|
todo := 0
|
||||||
err := ticketBkt.ForEach(func(k, v []byte) error {
|
err := ticketBkt.ForEach(func(_, _ []byte) error {
|
||||||
todo++
|
todo++
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2020-2021 The Decred developers
|
// Copyright (c) 2020-2024 The Decred developers
|
||||||
// Use of this source code is governed by an ISC
|
// Use of this source code is governed by an ISC
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ func (vdb *VspDatabase) SaveVoteChange(ticketHash string, record VoteChangeRecor
|
|||||||
var count int
|
var count int
|
||||||
newest := uint32(0)
|
newest := uint32(0)
|
||||||
oldest := uint32(math.MaxUint32)
|
oldest := uint32(math.MaxUint32)
|
||||||
err = bkt.ForEach(func(k, v []byte) error {
|
err = bkt.ForEach(func(k, _ []byte) error {
|
||||||
count++
|
count++
|
||||||
key := bytesToUint32(k)
|
key := bytesToUint32(k)
|
||||||
if key > newest {
|
if key > newest {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user