From 6fc62665cd3c44a047a0bda39dac810ca3c258c0 Mon Sep 17 00:00:00 2001 From: srdtrk Date: Thu, 18 Jul 2024 13:54:42 +0800 Subject: [PATCH] imp: updated e2es --- e2e/interchaintestv8/sp1_ics07_test.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/e2e/interchaintestv8/sp1_ics07_test.go b/e2e/interchaintestv8/sp1_ics07_test.go index c5fb1a2..cbc0281 100644 --- a/e2e/interchaintestv8/sp1_ics07_test.go +++ b/e2e/interchaintestv8/sp1_ics07_test.go @@ -107,11 +107,14 @@ func (s *SP1ICS07TendermintTestSuite) TestDeploy() { clientState, err := s.contract.GetClientState(nil) s.Require().NoError(err) + stakingParams, err := simd.StakingQueryParams(ctx) + s.Require().NoError(err) + s.Require().Equal(simd.Config().ChainID, clientState.ChainId) s.Require().Equal(uint8(testvalues.DefaultTrustLevel.Numerator), clientState.TrustLevel.Numerator) s.Require().Equal(uint8(testvalues.DefaultTrustLevel.Denominator), clientState.TrustLevel.Denominator) - s.Require().Equal(uint32(1_209_600), clientState.TrustingPeriod) - s.Require().Equal(uint32(1_209_600), clientState.UnbondingPeriod) + s.Require().Equal(uint32(stakingParams.UnbondingTime.Seconds()), clientState.TrustingPeriod) + s.Require().Equal(uint32(stakingParams.UnbondingTime.Seconds()), clientState.UnbondingPeriod) s.Require().False(clientState.IsFrozen) s.Require().Equal(uint32(1), clientState.LatestHeight.RevisionNumber) s.Require().Greater(clientState.LatestHeight.RevisionHeight, uint32(0)) @@ -134,11 +137,14 @@ func (s *SP1ICS07TendermintTestSuite) TestUpdateClient() { clientState, err := s.contract.GetClientState(nil) s.Require().NoError(err) + stakingParams, err := simd.StakingQueryParams(ctx) + s.Require().NoError(err) + s.Require().Equal(simd.Config().ChainID, clientState.ChainId) s.Require().Equal(uint8(testvalues.DefaultTrustLevel.Numerator), clientState.TrustLevel.Numerator) s.Require().Equal(uint8(testvalues.DefaultTrustLevel.Denominator), clientState.TrustLevel.Denominator) - s.Require().Equal(uint32(1_209_600), clientState.TrustingPeriod) - s.Require().Equal(uint32(1_209_600), clientState.UnbondingPeriod) + s.Require().Equal(uint32(stakingParams.UnbondingTime.Seconds()), clientState.TrustingPeriod) + s.Require().Equal(uint32(stakingParams.UnbondingTime.Seconds()), clientState.UnbondingPeriod) s.Require().False(clientState.IsFrozen) s.Require().Equal(uint32(1), clientState.LatestHeight.RevisionNumber) s.Require().Greater(clientState.LatestHeight.RevisionHeight, s.latestHeight)