Skip to content

Commit c90b1e0

Browse files
committed
rename node-state to self-consensus-state
1 parent 4570955 commit c90b1e0

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ Ref: https://keepachangelog.com/en/1.0.0/
7373
* (modules/light-clients/07-tendermint) [\#125](https://github.com/cosmos/ibc-go/pull/125) Implement efficient iteration of consensus states and pruning of earliest expired consensus state on UpdateClient.
7474
* (modules/light-clients/07-tendermint) [\#141](https://github.com/cosmos/ibc-go/pull/141) Return early in case there's a duplicate update call to save Gas.
7575

76+
### Client Breaking Changes
77+
78+
* (02-client/cli) [\#196](https://github.com/cosmos/ibc-go/pull/196) Rename `node-state` cli command to `self-consensus-state`.
7679

7780
## IBC in the Cosmos SDK Repository
7881

modules/core/02-client/client/cli/cli.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func GetQueryCmd() *cobra.Command {
2323
GetCmdQueryConsensusStates(),
2424
GetCmdQueryConsensusState(),
2525
GetCmdQueryHeader(),
26-
GetCmdNodeConsensusState(),
26+
GetCmdSelfConsensusState(),
2727
GetCmdParams(),
2828
)
2929

modules/core/02-client/client/cli/query.go

+7-8
Original file line numberDiff line numberDiff line change
@@ -206,21 +206,20 @@ func GetCmdQueryHeader() *cobra.Command {
206206
return cmd
207207
}
208208

209-
// GetCmdNodeConsensusState defines the command to query the latest consensus state of a node
210-
// The result is feed to client creation
211-
func GetCmdNodeConsensusState() *cobra.Command {
209+
// GetCmdSelfConsensusState defines the command to query the self consensus state of a chain
210+
func GetCmdSelfConsensusState() *cobra.Command {
212211
cmd := &cobra.Command{
213-
Use: "node-state",
214-
Short: "Query a node consensus state",
215-
Long: "Query a node consensus state. This result is feed to the client creation transaction.",
216-
Example: fmt.Sprintf("%s query %s %s node-state", version.AppName, host.ModuleName, types.SubModuleName),
212+
Use: "self-consensus-state",
213+
Short: "Query the self consensus state for this chain",
214+
Long: "Query the self consensus state for this chain. This result may be used for verifying IBC clients representing this chain which are hosted on counterparty chains.",
215+
Example: fmt.Sprintf("%s query %s %s self-consensus-state", version.AppName, host.ModuleName, types.SubModuleName),
217216
Args: cobra.NoArgs,
218217
RunE: func(cmd *cobra.Command, _ []string) error {
219218
clientCtx, err := client.GetClientQueryContext(cmd)
220219
if err != nil {
221220
return err
222221
}
223-
state, _, err := utils.QueryNodeConsensusState(clientCtx)
222+
state, _, err := utils.QuerySelfConsensusState(clientCtx)
224223
if err != nil {
225224
return err
226225
}

modules/core/02-client/client/utils/utils.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ func QueryTendermintHeader(clientCtx client.Context) (ibctmtypes.Header, int64,
165165
return header, height, nil
166166
}
167167

168-
// QueryNodeConsensusState takes a client context and returns the appropriate
168+
// QuerySelfConsensusState takes a client context and returns the appropriate
169169
// tendermint consensus state
170-
func QueryNodeConsensusState(clientCtx client.Context) (*ibctmtypes.ConsensusState, int64, error) {
170+
func QuerySelfConsensusState(clientCtx client.Context) (*ibctmtypes.ConsensusState, int64, error) {
171171
node, err := clientCtx.GetNode()
172172
if err != nil {
173173
return &ibctmtypes.ConsensusState{}, 0, err

0 commit comments

Comments
 (0)