From 49ddcdb4b04d662702ae6b7886e9d93310de2c76 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Sat, 27 Jun 2020 01:09:35 +0200 Subject: [PATCH] Don't pass pointers Signed-off-by: Jakub Sztandera --- cmd/lotus-bench/import.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/lotus-bench/import.go b/cmd/lotus-bench/import.go index a8d962ff0..4f1f87c4f 100644 --- a/cmd/lotus-bench/import.go +++ b/cmd/lotus-bench/import.go @@ -264,7 +264,7 @@ func (s1 *stats) Combine(s2 *stats) { s1.dSqr = newVar * (newCount - 1) } -func tallyGasCharges(charges map[string]*stats, et *types.ExecutionTrace) { +func tallyGasCharges(charges map[string]*stats, et types.ExecutionTrace) { for _, gc := range et.GasCharges { compGas := gc.ComputeGas + gc.VirtualComputeGas @@ -279,7 +279,7 @@ func tallyGasCharges(charges map[string]*stats, et *types.ExecutionTrace) { s.AddPoint(ratio) //fmt.Printf("%s: %d, %s: %0.2f\n", gc.Name, compGas, gc.TimeTaken, 1/(ratio/GasPerNs)) for _, sub := range et.Subcalls { - tallyGasCharges(charges, &sub) + tallyGasCharges(charges, sub) } } @@ -343,7 +343,7 @@ var importAnalyzeCmd = &cli.Command{ }) } - tallyGasCharges(chargeStats, &inv.ExecutionTrace) + tallyGasCharges(chargeStats, inv.ExecutionTrace) } if len(expensiveInvocs) > 4*invocsKeep { sort.Slice(expensiveInvocs, func(i, j int) bool {