Skip to content

Commit

Permalink
test: add pruned historical info testcase to tendermint consensus host
Browse files Browse the repository at this point in the history
  • Loading branch information
damiannolan committed Apr 2, 2024
1 parent ef6c625 commit fc4d349
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/light-clients/07-tendermint/consensus_host_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ func (suite *TendermintTestSuite) TestGetSelfConsensusState() {
},
expError: stakingtypes.ErrNoHistoricalInfo,
},
{
name: "pruned historical info",
malleate: func() {
height = clienttypes.NewHeight(1, uint64(suite.chainA.GetContext().BlockHeight())-1)

suite.chainA.GetSimApp().StakingKeeper.DeleteHistoricalInfo(suite.chainA.GetContext(), int64(height.GetRevisionHeight()))

Check failure on line 43 in modules/light-clients/07-tendermint/consensus_host_test.go

View workflow job for this annotation

GitHub Actions / lint

Error return value of `.DeleteHistoricalInfo` is not checked (errcheck)
},
expError: stakingtypes.ErrNoHistoricalInfo,
},
{
name: "custom consensus host: failure",
malleate: func() {
Expand Down

0 comments on commit fc4d349

Please sign in to comment.