Deuteronomy 26:3 – And you shall come to the Cohen who will be [serving] in those days, and say to him, “I declare this day to the Lord, your God, that I have come to the land which the Lord swore to our forefathers to give us.”
Gemora Kiddushin (66b) [The verse does not make sense to say “come to the Cohen in your day…”] is it possible to go to a Cohen from a different era? Rather, this verse is hinting at the law regarding a Cohen who was kosher and then invalidated. Thus we learn that a Cohen who is the son of a divorcee or a chalutzah and performed the service in the temple, the service is still valid.
Torah Temimah Colloquial Translation on Note #16:
Even if before he performed the service it was known that he was a son of a divorcee or a chalutzah, his service is still valid. See a similar comment in Parshat Shoftim [about going to a judge who will be ‘in your days’.]
Also see the comment in Parshat וזאת הברכה on a further explanation of the Cohen who is the son of a divorcee.
Editor’s Note: this short note serves only to point out another source for the ruling regarding the Cohen who is the son of a divorces. One extra detail that the Torah Temimah adds here is “even though it was known ahead of time, that he was the son of a divorcee”, nevertheless his service [if already done] is still valid. See this further note: http://temimahblog.com/2016/09/29/parshat-%D7%95%D7%96%D7%90%D7%AA-%D7%94%D7%91%D7%A8%D7%9B%D7%94-devarim-3311-in-what-way-is-the-cohen-invalid/