(t *testing.T)
| 107 | } |
| 108 | |
| 109 | func TestRollbackDifferentStateHeight(t *testing.T) { |
| 110 | const height = int64(100) |
| 111 | stateStore := setupStateStore(t, height) |
| 112 | blockStore := &mocks.BlockStore{} |
| 113 | blockStore.On("Height").Return(height + 2) |
| 114 | |
| 115 | _, _, err := state.Rollback(blockStore, stateStore) |
| 116 | require.Error(t, err) |
| 117 | require.Equal(t, err.Error(), "statestore height (100) is not one below or equal to blockstore height (102)") |
| 118 | } |
| 119 | |
| 120 | func setupStateStore(t *testing.T, height int64) state.Store { |
| 121 | stateStore := state.NewStore(dbm.NewMemDB(), state.StoreOptions{DiscardABCIResponses: false}) |
nothing calls this directly
no test coverage detected