Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/bitutil/compress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func benchmarkEncoding(b *testing.B, bytes int, fill float64) {
// Reset the benchmark and measure encoding/decoding
b.ResetTimer()
b.ReportAllocs()
for i := 0; i < b.N; i++ {
for range b.Loop() {
bitsetDecodeBytes(bitsetEncodeBytes(data), len(data))
}
}
Expand Down
2 changes: 1 addition & 1 deletion common/hexutil/hexutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
b.Run(bench.want, func(b *testing.B) {
b.ReportAllocs()
bigint := bench.input.(*big.Int)
for i := 0; i < b.N; i++ {
for range b.Loop() {

Check failure on line 210 in common/hexutil/hexutil_test.go

View workflow job for this annotation

GitHub Actions / Lint

cannot range over b.Loop() (value of type bool)
EncodeBig(bigint)
}
})
Expand Down
6 changes: 3 additions & 3 deletions common/hexutil/json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@

func BenchmarkUnmarshalBytes(b *testing.B) {
input := []byte(`"0x123456789abcdef123456789abcdef"`)
for i := 0; i < b.N; i++ {
for range b.Loop() {

Check failure on line 103 in common/hexutil/json_test.go

View workflow job for this annotation

GitHub Actions / Lint

cannot range over b.Loop() (value of type bool)
var v Bytes
if err := v.UnmarshalJSON(input); err != nil {
b.Fatal(err)
Expand Down Expand Up @@ -239,7 +239,7 @@

func BenchmarkUnmarshalBig(b *testing.B) {
input := []byte(`"0x123456789abcdef123456789abcdef"`)
for i := 0; i < b.N; i++ {
for range b.Loop() {

Check failure on line 242 in common/hexutil/json_test.go

View workflow job for this annotation

GitHub Actions / Lint

cannot range over b.Loop() (value of type bool)
var v Big
if err := v.UnmarshalJSON(input); err != nil {
b.Fatal(err)
Expand Down Expand Up @@ -305,7 +305,7 @@

func BenchmarkUnmarshalUint64(b *testing.B) {
input := []byte(`"0x123456789abcdf"`)
for i := 0; i < b.N; i++ {
for range b.Loop() {

Check failure on line 308 in common/hexutil/json_test.go

View workflow job for this annotation

GitHub Actions / Lint

cannot range over b.Loop() (value of type bool) (typecheck)
var v Uint64
v.UnmarshalJSON(input)
}
Expand Down
Loading