The Messenger of Allah ﷺ would stand in prayer until his feet became swollen. It was said to him, "Messenger of Allah, has not Allah forgiven you your past and future sins?"He replied, "Should I not, then, be a grateful servant?"
حدثنا هشام بن عمار حدثنا سفيان بن عيينة عن زياد بن علاقة سمع
قام رسول الله ﷺ حتى تورمت قدماه فقيل يا رسول الله قد غفر الله لك ما تقدم من ذنبك وما تأخر قال أفلا أكون عبدا شكورا
Bukhari narrated it in the Book of Tafsir, chapter "The Statement of Allah, That Allah May Forgive You Your Past Sin..." etc., hadith no. 4836 (Surah 48), and Muslim narrated it in the Book of the Characteristics of the Hypocrites, chapter "Doing Many Deeds and Striving Hard in Worship," hadith no. 2819, from the hadith of Sufyan, through this same chain.