mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +00:00
cmd/workload: address comments from matt
This commit is contained in:
parent
ec82bf357c
commit
2a71014810
2 changed files with 8 additions and 11 deletions
|
|
@ -41,7 +41,6 @@ type traceTest struct {
|
|||
type traceTestSuite struct {
|
||||
cfg testConfig
|
||||
tests traceTest
|
||||
|
||||
invalidDir string
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -117,25 +117,23 @@ func generateTraceTests(clictx *cli.Context) error {
|
|||
result, err := client.Geth.TraceTransaction(ctx, tx.Hash(), config)
|
||||
if err != nil {
|
||||
failed += 1
|
||||
continue
|
||||
break
|
||||
}
|
||||
blob, err := json.Marshal(result)
|
||||
if err != nil {
|
||||
failed += 1
|
||||
continue
|
||||
break
|
||||
}
|
||||
test.TxHashes = append(test.TxHashes, tx.Hash())
|
||||
test.TraceConfigs = append(test.TraceConfigs, *config)
|
||||
test.ResultHashes = append(test.ResultHashes, crypto.Keccak256Hash(blob))
|
||||
|
||||
writeTraceResult(outputDir, tx.Hash(), result, configName)
|
||||
|
||||
}
|
||||
if time.Since(logged) > time.Second*8 {
|
||||
logged = time.Now()
|
||||
log.Info("Tracing transactions", "executed", len(test.TxHashes), "failed", failed, "elapsed", common.PrettyDuration(time.Since(start)))
|
||||
}
|
||||
}
|
||||
}
|
||||
log.Info("Traced transactions", "executed", len(test.TxHashes), "failed", failed, "elapsed", common.PrettyDuration(time.Since(start)))
|
||||
|
||||
// Write output file.
|
||||
|
|
|
|||
Loading…
Reference in a new issue