Tawaaf

Doubting whether one was in a state of haidh while performing umrah and hajj

Q: My concern is as follows:

Alhamdullillah, Allah Ta'ala has granted me the opportunity on several occasions to perform Umrah, as well as the opportunity of Hajj. The problem is, I have a problem with my haidh. I have an issue with stained discharge. At the time when I performed Umrah and Hajj, I was unaware of the fact that the discharge was in fact haidh. Hence I performed ghusl early, and very likely spotted after. It is very rare that I do not spot. There is a very high possibility that when I performed my Umrah, and Hajj, I required ghusl. Hence I would have performed all fard, wajib and nafl tawaaf in a state of impurity. Are the Umrah, and Hajj valid? Is any damm required from my side?