If You JailBreak Your IPhone and then restore it, does your warranty return?

I recently jailbroke my IPhone but then got scared, I then re-stored. Now my lock button does not work and I have to get it repaired. I'm afraid that apple will recognize that I have jailbroken my IPhone and then not repair it. So when I restore my phone does the warranty still stand?

Your warranty does not return. They can tell whether or not the phone was jailbroken when they fix it.

No… You voided the warranty with the jailbreak.