Al-Aswad bin Qays relates that it is narrated from Sayyiduna Jundub (may Allah be pleased with him): I was with the Prophet (peace and blessings be upon him) in a cave when his (peace and blessings be upon him) finger was injured. So he (peace and blessings be upon him) said: "You are but a finger that has bled, and in the way of Allah is whatever has befallen you."
Hadith Referenceالمعجم الكبير للطبراني / باب الجيم / 1692