diff --git a/tests/integration/misbehaviour.go b/tests/integration/misbehaviour.go index 63b0eafb6d..f6b737ad6a 100644 --- a/tests/integration/misbehaviour.go +++ b/tests/integration/misbehaviour.go @@ -408,6 +408,14 @@ func (s *CCVTestSuite) TestCheckMisbehaviour() { altSigners2, ) + // Set the equivocation evidence min height to a the previous block height + equivocationEvidenceMinHeight := clientHeight.RevisionHeight + 1 + s.providerApp.GetProviderKeeper().SetEquivocationEvidenceMinHeight( + s.providerCtx(), + s.consumerChain.ChainID, + equivocationEvidenceMinHeight, + ) + testCases := []struct { name string misbehaviour *ibctmtypes.Misbehaviour @@ -476,6 +484,24 @@ func (s *CCVTestSuite) TestCheckMisbehaviour() { }, false, }, + { + "invalid misbehaviour older than min equivocation evidence height - shouldn't pass", + &ibctmtypes.Misbehaviour{ + ClientId: s.path.EndpointA.ClientID, + Header1: s.consumerChain.CreateTMClientHeader( + s.consumerChain.ChainID, + int64(equivocationEvidenceMinHeight-1), + clientHeight, + headerTs, + altValset, + altValset, + clientTMValset, + altSigners, + ), + Header2: clientHeader, + }, + false, + }, { "one header of the misbehaviour has insufficient voting power - shouldn't pass", &ibctmtypes.Misbehaviour{