Skip to content

Commit

Permalink
fix(abci-cli): add version
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Mar 27, 2024
1 parent 545821b commit 15cb151
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions abci/cmd/abci-cli/abci-cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/dashpay/tenderdash/libs/log"
"github.com/dashpay/tenderdash/proto/tendermint/crypto"
tmproto "github.com/dashpay/tenderdash/proto/tendermint/types"
pbversion "github.com/dashpay/tenderdash/proto/tendermint/version"
"github.com/dashpay/tenderdash/version"
)

Expand Down Expand Up @@ -54,7 +55,7 @@ func RootCmmand(logger log.Logger) *cobra.Command {
Use: "abci-cli",
Short: "the ABCI CLI tool wraps an ABCI client",
Long: "the ABCI CLI tool wraps an ABCI client and is used for testing ABCI servers",
PersistentPreRunE: func(cmd *cobra.Command, args []string) (err error) {
PersistentPreRunE: func(cmd *cobra.Command, _args []string) (err error) {

switch cmd.Use {
case "kvstore", "version":
Expand Down Expand Up @@ -223,7 +224,7 @@ var versionCmd = &cobra.Command{
Short: "print ABCI console version",
Long: "print ABCI console version",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(_cmd *cobra.Command, _args []string) error {
fmt.Println(version.ABCIVersion)
return nil
},
Expand Down Expand Up @@ -697,8 +698,9 @@ func cmdProcessProposal(cmd *cobra.Command, args []string) error {
panic(err)
}
res, err := client.ProcessProposal(cmd.Context(), &types.RequestProcessProposal{
Height: height,
Txs: txsBytesArray,
Height: height,
Txs: txsBytesArray,
Version: &pbversion.Consensus{Block: version.BlockProtocol, App: kvstore.ProtocolVersion},
})
if err != nil {
return err
Expand All @@ -711,7 +713,7 @@ func cmdProcessProposal(cmd *cobra.Command, args []string) error {
}

func makeKVStoreCmd(logger log.Logger) func(*cobra.Command, []string) error {
return func(cmd *cobra.Command, args []string) error {
return func(cmd *cobra.Command, _args []string) error {
// Create the application - in memory or persisted to disk
var (
app types.Application
Expand Down

0 comments on commit 15cb151

Please sign in to comment.