When Lyman Sherman was obedient to a prompting and approached Joseph Smith for a prompting, the Lord blesses him with forgiveness and "rest concerning [his] spiritual state." This blessing can be ours as well through the Saviors atonement as we strive to obey God's commands.
Elder Scott
https://www.churchofjesuschrist.org/study/general-conference/2004/10/peace-of-conscience-and-peace-of-mind?lang=eng