Sahih Bukhari Volume 009, Book 092, Hadith Number 450.
Hadith Section/Book: Sahih Bukhari Sahih Bukhari Book 92. Holding Fast to the Qur'an and Sunnah
Narrated By 'Amr bin Al-'As : That he heard Allah's Apostle saying, "If a judge gives a verdict according to the best of his knowledge and his verdict is correct (i.e. agrees with Allah and His Apostle's verdict) he will receive a double reward, and if he gives a verdict according to the best of his knowledge and his verdict is wrong, (i.e. against that of Allah and His Apostle) even then he will get a reward."