Skip to content

Commit

Permalink
Merge pull request #54 from informalsystems/52-add-a-makefile-and-ver…
Browse files Browse the repository at this point in the history
…sion-info

Adds a Makefile and version command
  • Loading branch information
p-offtermatt authored Sep 12, 2023
2 parents 74d008e + 891dfec commit ec93723
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
install:
go install ./cometmock
12 changes: 12 additions & 0 deletions cometmock/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import (
"github.com/urfave/cli/v2"
)

const version = "v0.37.x"

// GetMockPVsFromNodeHomes returns a list of MockPVs, created with the priv_validator_key's from the specified node homes
// We use MockPV because they do not do sanity checks that would e.g. prevent double signing
func GetMockPVsFromNodeHomes(nodeHomes []string) []types.PrivValidator {
Expand All @@ -43,6 +45,16 @@ func main() {
app := &cli.App{
Name: "cometmock",
HideHelpCommand: true,
Commands: []*cli.Command{
{
Name: "version",
Usage: "Print the version of cometmock",
Action: func(c *cli.Context) error {
fmt.Printf("%s\n", version)
return nil
},
},
},
Flags: []cli.Flag{
&cli.Int64Flag{
Name: "block-time",
Expand Down

0 comments on commit ec93723

Please sign in to comment.