All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Completing the prayer while knowing your state of impurity was wrong and you should repent to Allaah The Almighty from such an act. You should have left the prayer after realizing your state of impurity and chose one of the worshippers to take your place and lead the congregational prayer. However, since you have already done so, you are not obliged to inform those whom you led and this does not constitute a betrayal to them since their prayer is valid as long as they did not know about your impurity.