You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
859 B

10 years ago
  1. package main
  2. import (
  3. "fmt"
  4. "os"
  5. "github.com/tendermint/tendermint2/config"
  6. "github.com/tendermint/tendermint2/daemon"
  7. "github.com/tendermint/tendermint2/logger"
  8. )
  9. func main() {
  10. args := os.Args[1:]
  11. if len(args) == 0 {
  12. fmt.Println(`Tendermint
  13. Commands:
  14. daemon Run the tendermint node daemon
  15. gen_account Generate new account keypair
  16. gen_validator Generate new validator keypair
  17. gen_tx Generate new transaction
  18. probe_upnp Test UPnP functionality
  19. `)
  20. return
  21. }
  22. switch args[0] {
  23. case "daemon":
  24. config.ParseFlags(args[1:])
  25. logger.Reset()
  26. daemon.Daemon()
  27. case "gen_account":
  28. gen_account()
  29. case "gen_validator":
  30. gen_validator()
  31. case "gen_tx":
  32. config.ParseFlags(args[1:])
  33. logger.Reset()
  34. gen_tx()
  35. case "probe_upnp":
  36. probe_upnp()
  37. default:
  38. fmt.Printf("Unknown command %v\n", args[0])
  39. }
  40. }