19 Repent ye therefore, and be converted, that your sins may be blotted out, when the times of refreshing shall come from the presence of the Lord;
20 And he shall send Jesus Christ, which before was preached unto you:
21 Whom the heaven must receive until the times of restitution of all things, which God hath spoken by the mouth of all his holy prophets since the world began.
The Doctrine and Covenants, Section 128:17-18
17 And again, in connection with this quotation I will give you a quotation from one of the prophets, who had his eye fixed on the restoration of the priesthood, the glories to be revealed in the last days, and in an especial manner this most glorious of all subjects belonging to the everlasting gospel, namely, the baptism for the dead; for Malachi says, last chapter, verses 5th and 6th: Behold, I will send you Elijah the prophet before the coming of the great and dreadful day of the Lord: And he shall turn the heart of the fathers to the children, and the heart of the children to their fathers, lest I come and smite the earth with a curse.
18 I might have rendered a plainer translation to this, but it is sufficiently plain to suit my purpose as it stands. It is sufficient to know, in this case, that the earth will be smitten with a curse unless there is a welding link of some kind or other between the fathers and the children, upon some subject or other–and behold what is that subject? It is the baptism for the dead. For we without them cannot be made perfect; neither can they without us be made perfect. Neither can they nor we be made perfect without those who have died in the gospel also; for it is necessary in the ushering in of the dispensation of the fulness of times, which dispensation is now beginning to usher in, that a whole and complete and perfect union, and welding together of dispensations, and keys, and powers, and glories should take place, and be revealed from the days of Adam even to the present time. And not only this, but those things which never have been revealed from the foundation of the world, but have been kept hid from the wise and prudent, shall be revealed unto babes and sucklings in this, the dispensation of the fulness of times.
The Doctrine and Covenants, Section 27:6
6 And also with Elias, to whom I have committed the keys of bringing to pass the restoration of all things spoken by the mouth of all the holy prophets since the world began, concerning the last days;
Conference Report, Joseph F. Smith, October 1931
The ancient prophets looked forward to this dispensation for they knew it was to be the time of the restoration of all things both which are in heaven and which are on earth. This restoration was to come through the sending of the Gospel from heaven with the fulness of the priesthood, and all things were eventually to be set in order according to the will of the Lord.