-
Notifications
You must be signed in to change notification settings - Fork 0
/
ibft.go
executable file
·42 lines (36 loc) · 1.07 KB
/
ibft.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package ibft
import (
"github.com/definenulls/komerco-chain/command/helper"
"github.com/definenulls/komerco-chain/command/ibft/candidates"
"github.com/definenulls/komerco-chain/command/ibft/propose"
"github.com/definenulls/komerco-chain/command/ibft/quorum"
"github.com/definenulls/komerco-chain/command/ibft/snapshot"
"github.com/definenulls/komerco-chain/command/ibft/status"
_switch "github.com/definenulls/komerco-chain/command/ibft/switch"
"github.com/spf13/cobra"
)
func GetCommand() *cobra.Command {
ibftCmd := &cobra.Command{
Use: "ibft",
Short: "Top level IBFT command for interacting with the IBFT consensus. Only accepts subcommands.",
}
helper.RegisterGRPCAddressFlag(ibftCmd)
registerSubcommands(ibftCmd)
return ibftCmd
}
func registerSubcommands(baseCmd *cobra.Command) {
baseCmd.AddCommand(
// ibft status
status.GetCommand(),
// ibft snapshot
snapshot.GetCommand(),
// ibft propose
propose.GetCommand(),
// ibft candidates
candidates.GetCommand(),
// ibft switch
_switch.GetCommand(),
// ibft quorum
quorum.GetCommand(),
)
}