From d667ace0598cd4d31e49c84548b68bc9aa3b6ae6 Mon Sep 17 00:00:00 2001 From: Luis Ayuso Date: Tue, 29 Oct 2024 09:18:29 +0100 Subject: [PATCH] Remove constants typing. --- go/ct/evm_fuzz_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/go/ct/evm_fuzz_test.go b/go/ct/evm_fuzz_test.go index 31c6935ec..5dd55a60b 100644 --- a/go/ct/evm_fuzz_test.go +++ b/go/ct/evm_fuzz_test.go @@ -138,9 +138,9 @@ func fuzzVm(testee ct.Evm, f *testing.F) { } const ( - fuzzIdealStackSize int = 7 // < max pops in a single instruction - fuzzMaximumCodeSegment int = 33 // < 1 instruction with 32 data bytes - fuzzMaxGas int = 5_000_000_000 // < gas limits memory usage + fuzzIdealStackSize = 7 // < max pops in a single instruction + fuzzMaximumCodeSegment = 33 // < 1 instruction with 32 data bytes + fuzzMaxGas = 5_000_000_000 // < gas limits memory usage ) // prepareFuzzingSeeds is a helper function to be used by similar fuzzing tests @@ -159,7 +159,7 @@ func prepareFuzzingSeeds(f *testing.F) { // the fuzzer will generate more interesting values around these, the initial // list just sketches a region of interest around which the fuzzer will generate // more values. I found no measurable difference about being more accurate. - for _, gas := range []int64{0, 1, 6, 10, 1000, int64(fuzzMaxGas)} { + for _, gas := range []int64{0, 1, 6, 10, 1000, fuzzMaxGas} { // generate a code segment with the operation followed by 6 random values ops := make([]byte, fuzzMaximumCodeSegment) @@ -216,7 +216,7 @@ func corpusEntryToCtState(opCodes []byte, gas int64, revision byte, stackBytes [ return nil, fmt.Errorf("negative gas %v", gas) } - if gas > int64(fuzzMaxGas) { + if gas > fuzzMaxGas { return nil, fmt.Errorf("gas too large %v", gas) }