mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 14:16: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
|
|
@ -39,9 +39,8 @@ type traceTest struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type traceTestSuite struct {
|
type traceTestSuite struct {
|
||||||
cfg testConfig
|
cfg testConfig
|
||||||
tests traceTest
|
tests traceTest
|
||||||
|
|
||||||
invalidDir string
|
invalidDir string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -117,23 +117,21 @@ func generateTraceTests(clictx *cli.Context) error {
|
||||||
result, err := client.Geth.TraceTransaction(ctx, tx.Hash(), config)
|
result, err := client.Geth.TraceTransaction(ctx, tx.Hash(), config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
failed += 1
|
failed += 1
|
||||||
continue
|
break
|
||||||
}
|
}
|
||||||
blob, err := json.Marshal(result)
|
blob, err := json.Marshal(result)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
failed += 1
|
failed += 1
|
||||||
continue
|
break
|
||||||
}
|
}
|
||||||
test.TxHashes = append(test.TxHashes, tx.Hash())
|
test.TxHashes = append(test.TxHashes, tx.Hash())
|
||||||
test.TraceConfigs = append(test.TraceConfigs, *config)
|
test.TraceConfigs = append(test.TraceConfigs, *config)
|
||||||
test.ResultHashes = append(test.ResultHashes, crypto.Keccak256Hash(blob))
|
test.ResultHashes = append(test.ResultHashes, crypto.Keccak256Hash(blob))
|
||||||
|
|
||||||
writeTraceResult(outputDir, tx.Hash(), result, configName)
|
writeTraceResult(outputDir, tx.Hash(), result, configName)
|
||||||
|
}
|
||||||
if time.Since(logged) > time.Second*8 {
|
if time.Since(logged) > time.Second*8 {
|
||||||
logged = time.Now()
|
logged = time.Now()
|
||||||
log.Info("Tracing transactions", "executed", len(test.TxHashes), "failed", failed, "elapsed", common.PrettyDuration(time.Since(start)))
|
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)))
|
log.Info("Traced transactions", "executed", len(test.TxHashes), "failed", failed, "elapsed", common.PrettyDuration(time.Since(start)))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue