@@ -77,8 +77,10 @@ func (suite *SoloMachineTestSuite) TestStatus() {
77
77
}
78
78
79
79
func (suite * SoloMachineTestSuite ) TestGetTimestampAtHeight () {
80
- var clientID string
81
- height := clienttypes .NewHeight (0 , suite .solomachine .ClientState ().Sequence )
80
+ var (
81
+ clientID string
82
+ height exported.Height
83
+ )
82
84
83
85
testCases := []struct {
84
86
name string
@@ -92,6 +94,15 @@ func (suite *SoloMachineTestSuite) TestGetTimestampAtHeight() {
92
94
suite .solomachine .ClientState ().ConsensusState .Timestamp ,
93
95
nil ,
94
96
},
97
+ {
98
+ "success: modified height" ,
99
+ func () {
100
+ height = clienttypes .ZeroHeight ()
101
+ },
102
+ // Timestamp should be the same.
103
+ suite .solomachine .ClientState ().ConsensusState .Timestamp ,
104
+ nil ,
105
+ },
95
106
{
96
107
"failure: cannot find client state" ,
97
108
func () {
@@ -108,6 +119,7 @@ func (suite *SoloMachineTestSuite) TestGetTimestampAtHeight() {
108
119
suite .Run (tc .name , func () {
109
120
clientID = suite .solomachine .ClientID
110
121
clientState := suite .solomachine .ClientState ()
122
+ height = clienttypes .NewHeight (0 , suite .solomachine .ClientState ().Sequence )
111
123
112
124
lightClientModule , found := suite .chainA .App .GetIBCKeeper ().ClientKeeper .Route (clientID )
113
125
suite .Require ().True (found )
@@ -231,7 +243,7 @@ func (suite *SoloMachineTestSuite) TestVerifyMembership() {
231
243
"success: client state verification" ,
232
244
func () {
233
245
clientState = sm .ClientState ()
234
- clientStateBz , err := suite .chainA .Codec .Marshal (clientState )
246
+ clientStateBz , err := suite .chainA .Codec .MarshalInterface (clientState )
235
247
suite .Require ().NoError (err )
236
248
237
249
path = sm .GetClientStatePath (counterpartyClientIdentifier )
@@ -267,7 +279,7 @@ func (suite *SoloMachineTestSuite) TestVerifyMembership() {
267
279
func () {
268
280
clientState = sm .ClientState ()
269
281
consensusState := clientState .ConsensusState
270
- consensusStateBz , err := suite .chainA .Codec .Marshal (consensusState )
282
+ consensusStateBz , err := suite .chainA .Codec .MarshalInterface (consensusState )
271
283
suite .Require ().NoError (err )
272
284
273
285
path = sm .GetConsensusStatePath (counterpartyClientIdentifier , clienttypes .NewHeight (0 , 1 ))
0 commit comments