From 1f84917da0cca3d8de3250cbf0219c0236332213 Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Fri, 4 Oct 2024 20:13:24 +0700 Subject: [PATCH] make ExecStats non-public --- cmd/evm/runner.go | 4 ++-- cmd/evm/staterunner.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/evm/runner.go b/cmd/evm/runner.go index 782a2ec78f..2e61db2664 100644 --- a/cmd/evm/runner.go +++ b/cmd/evm/runner.go @@ -74,14 +74,14 @@ func readGenesis(genesisPath string) *core.Genesis { return genesis } -type ExecStats struct { +type execStats struct { Time time.Duration `json:"time"` // The execution Time. Allocs int64 `json:"allocs"` // The number of heap allocations during execution. BytesAllocated int64 `json:"bytesAllocated"` // The cumulative number of bytes allocated during execution. GasUsed uint64 `json:"gasUsed"` // the amount of gas used during execution } -func timedExec(bench bool, execFunc func() ([]byte, uint64, error)) (output []byte, stats ExecStats, err error) { +func timedExec(bench bool, execFunc func() ([]byte, uint64, error)) (output []byte, stats execStats, err error) { var gasUsed uint64 if bench { result := testing.Benchmark(func(b *testing.B) { diff --git a/cmd/evm/staterunner.go b/cmd/evm/staterunner.go index 34ca0f1f21..d0a0d3287c 100644 --- a/cmd/evm/staterunner.go +++ b/cmd/evm/staterunner.go @@ -71,7 +71,7 @@ type StatetestResult struct { Fork string `json:"fork"` Error string `json:"error,omitempty"` State *state.Dump `json:"state,omitempty"` - BenchStats *ExecStats `json:"benchStats,omitempty"` + BenchStats *execStats `json:"benchStats,omitempty"` } func stateTestCmd(ctx *cli.Context) error {