Browse Source

check that we have enough arguments

Otherwise:

```
panic: runtime error: index out of range

goroutine 1 [running]:
panic(0xbb8de0, 0xc82000e080)
        /usr/local/go/src/runtime/panic.go:464 +0x3e6
main.main()
        /go/src/github.com/tendermint/tendermint/cmd/tendermint/main.go:48 +0x811
```
pull/379/head
Anton Kaliaev 8 years ago
parent
commit
3b7a1d7149
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 12 additions and 2 deletions
  1. +12
    -2
      cmd/tendermint/main.go

+ 12
- 2
cmd/tendermint/main.go View File

@ -45,9 +45,19 @@ Commands:
case "node": case "node":
run_node(config) run_node(config)
case "replay": case "replay":
consensus.RunReplayFile(config, args[1], false)
if len(args) > 1 {
consensus.RunReplayFile(config, args[1], false)
} else {
fmt.Println("replay requires an argument (walfile)")
os.Exit(1)
}
case "replay_console": case "replay_console":
consensus.RunReplayFile(config, args[1], true)
if len(args) > 1 {
consensus.RunReplayFile(config, args[1], true)
} else {
fmt.Println("replay_console requires an argument (walfile)")
os.Exit(1)
}
case "init": case "init":
init_files() init_files()
case "show_validator": case "show_validator":


Loading…
Cancel
Save