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.

43 lines
779 B

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