Skip to content

Commit

Permalink
nit: removed unused param from 'NewConsensusState' (cosmos#5159)
Browse files Browse the repository at this point in the history
  • Loading branch information
srdtrk committed Nov 22, 2023
1 parent c54ec07 commit 34f5798
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion modules/light-clients/08-wasm/testing/wasm_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (endpoint *WasmEndpoint) CreateClient() error {
require.NoError(endpoint.Chain.TB, err)

clientState := types.NewClientState(contractClientState, checksum, clienttypes.NewHeight(0, 1))
consensusState := types.NewConsensusState(contractConsensusState, 0)
consensusState := types.NewConsensusState(contractConsensusState)

msg, err := clienttypes.NewMsgCreateClient(
clientState, consensusState, endpoint.Chain.SenderAccount.GetAddress().String(),
Expand Down
2 changes: 1 addition & 1 deletion modules/light-clients/08-wasm/types/client_state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func (suite *TypesTestSuite) TestInitialize() {
suite.Require().NoError(err)

clientState = types.NewClientState([]byte{1}, checksum, clienttypes.NewHeight(0, 1))
consensusState = types.NewConsensusState([]byte{2}, 0)
consensusState = types.NewConsensusState([]byte{2})

clientID := suite.chainA.App.GetIBCKeeper().ClientKeeper.GenerateClientIdentifier(suite.chainA.GetContext(), clientState.ClientType())
clientStore = suite.chainA.App.GetIBCKeeper().ClientKeeper.ClientStore(suite.chainA.GetContext(), clientID)
Expand Down
2 changes: 1 addition & 1 deletion modules/light-clients/08-wasm/types/consensus_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
var _ exported.ConsensusState = (*ConsensusState)(nil)

// NewConsensusState creates a new ConsensusState instance.
func NewConsensusState(data []byte, timestamp uint64) *ConsensusState {
func NewConsensusState(data []byte) *ConsensusState {
return &ConsensusState{
Data: data,
}
Expand Down
8 changes: 3 additions & 5 deletions modules/light-clients/08-wasm/types/consensus_state_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package types_test

import (
"time"

"github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"
"github.com/cosmos/ibc-go/v8/modules/core/exported"
)
Expand All @@ -15,17 +13,17 @@ func (suite *TypesTestSuite) TestConsensusStateValidateBasic() {
}{
{
"success",
types.NewConsensusState([]byte("data"), uint64(time.Now().Unix())),
types.NewConsensusState([]byte("data")),
true,
},
{
"data is nil",
types.NewConsensusState(nil, uint64(time.Now().Unix())),
types.NewConsensusState(nil),
false,
},
{
"data is empty",
types.NewConsensusState([]byte{}, uint64(time.Now().Unix())),
types.NewConsensusState([]byte{}),
false,
},
}
Expand Down

0 comments on commit 34f5798

Please sign in to comment.