Skip to content

Commit

Permalink
Merge pull request #58 from multiversx/increase-max-blocks-to-generate
Browse files Browse the repository at this point in the history
Fixes and new flag
  • Loading branch information
miiu96 authored Jul 15, 2024
2 parents 96a8a9f + 50cd9d6 commit 508dc34
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
5 changes: 5 additions & 0 deletions cmd/chainsimulator/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ var (
Usage: "The path to proxy configs",
Value: "./config/proxy/config",
}
pathWhereToSaveLogs = cli.StringFlag{
Name: "path-log-save",
Usage: "The path where to save logs",
Value: "./",
}
startTime = cli.Int64Flag{
Name: "start-time",
Usage: "The start time of the chain",
Expand Down
10 changes: 3 additions & 7 deletions cmd/chainsimulator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ func main() {
blockTimeInMs,
skipConfigsDownload,
fetchConfigsAndClose,
pathWhereToSaveLogs,
}

app.Authors = []cli.Author{
Expand Down Expand Up @@ -300,14 +301,9 @@ func initializeLogger(ctx *cli.Context, cfg config.Config) (closing.Closer, erro
return nil, nil
}

workingDir, err := os.Getwd()
if err != nil {
log.LogIfError(err)
workingDir = ""
}

pathLogsSave := ctx.GlobalString(pathWhereToSaveLogs.Name)
fileLogging, err := file.NewFileLogging(file.ArgsFileLogging{
WorkingDir: workingDir,
WorkingDir: pathLogsSave,
DefaultLogsPath: cfg.Config.Logs.LogsPath,
LogFilePrefix: cfg.Config.Logs.LogFilePrefix,
})
Expand Down
2 changes: 1 addition & 1 deletion pkg/facade/simulatorFacade.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

const (
errMsgAccountNotFound = "account was not found"
maxNumOfBlockToGenerateUntilTxProcessed = 10
maxNumOfBlockToGenerateUntilTxProcessed = 20
)

type simulatorFacade struct {
Expand Down

0 comments on commit 508dc34

Please sign in to comment.