From ad98a9e86b2a958b4ee7676dd7d8bc65ff413547 Mon Sep 17 00:00:00 2001 From: Coder <161350311+MamunC0der@users.noreply.github.com> Date: Sat, 18 Oct 2025 13:47:03 +0200 Subject: [PATCH] Update json_test.go --- common/hexutil/json_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/hexutil/json_test.go b/common/hexutil/json_test.go index 3dc19680f9..b15752786b 100644 --- a/common/hexutil/json_test.go +++ b/common/hexutil/json_test.go @@ -100,7 +100,7 @@ func TestUnmarshalBytes(t *testing.T) { func BenchmarkUnmarshalBytes(b *testing.B) { input := []byte(`"0x123456789abcdef123456789abcdef"`) - for i := 0; i < b.N; i++ { + for range b.Loop() { var v Bytes if err := v.UnmarshalJSON(input); err != nil { b.Fatal(err) @@ -239,7 +239,7 @@ func TestUnmarshalU256(t *testing.T) { func BenchmarkUnmarshalBig(b *testing.B) { input := []byte(`"0x123456789abcdef123456789abcdef"`) - for i := 0; i < b.N; i++ { + for range b.Loop() { var v Big if err := v.UnmarshalJSON(input); err != nil { b.Fatal(err) @@ -305,7 +305,7 @@ func TestUnmarshalUint64(t *testing.T) { func BenchmarkUnmarshalUint64(b *testing.B) { input := []byte(`"0x123456789abcdf"`) - for i := 0; i < b.N; i++ { + for range b.Loop() { var v Uint64 v.UnmarshalJSON(input) }