all: update to golangci-lint 1.61.0 #30587 (#1181)

Co-authored-by: Martin Holst Swende <martin@swende.se>
This commit is contained in:
JukLee0ira 2025-07-01 18:10:05 +08:00 committed by GitHub
parent 1dc8158ef0
commit 87ed24a113
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 6 deletions

View file

@ -946,7 +946,7 @@ func TestOOMMaliciousInput(t *testing.T) {
}
encb, err := hex.DecodeString(test.enc)
if err != nil {
t.Fatalf("invalid hex: %s" + test.enc)
t.Fatalf("invalid hex: %s", test.enc)
}
_, err = abi.Methods["method"].Outputs.UnpackValues(encb)
if err == nil {

View file

@ -338,10 +338,10 @@ func TestBlockReceiptStorage(t *testing.T) {
// Insert the receipt slice into the database and check presence
WriteReceipts(db, hash, 0, receipts)
if rs := ReadReceipts(db, hash, 0, params.TestChainConfig); len(rs) == 0 {
t.Fatalf("no receipts returned")
t.Fatal("no receipts returned")
} else {
if err := checkReceiptsRLP(rs, receipts); err != nil {
t.Fatalf("fail to checkReceiptsRLP %v", err)
t.Fatal(err)
}
}
// Delete the body and ensure that the receipts are no longer returned (metadata can't be recomputed)
@ -351,7 +351,7 @@ func TestBlockReceiptStorage(t *testing.T) {
}
// Ensure that receipts without metadata can be returned without the block body too
if err := checkReceiptsRLP(ReadRawReceipts(db, hash, 0), receipts); err != nil {
t.Fatalf("fail to checkReceiptsRLP %v", err)
t.Fatal(err)
}
// Sanity check that body alone without the receipt is a full purge
WriteBody(db, hash, 0, body)

View file

@ -17,7 +17,6 @@
package flags
import (
"os"
"os/user"
"runtime"
"testing"
@ -51,7 +50,7 @@ func TestPathExpansion(t *testing.T) {
}
}
os.Setenv(`DDDXXX`, `/tmp`)
t.Setenv(`DDDXXX`, `/tmp`)
for test, expected := range tests {
got := expandPath(test)
if got != expected {