Jacob Earnest is one of the really fine late makers and lived from 1805 to 1884. So he wouldn't have made a gun much before 1825, so the T Ketland lock doesn't really fit with one of his new made guns. Also, the barrel tang doesn't have the same spear point shape that Earnest used. In fact, the tang looks much more like the one used by Adam Ernst, but with the shoulders filed off.
One problem with the signatures of A Ernst and J Earnest, is that both guys signed their names as They thought they were spelled, and not how We think there were spelled, so both last names look like pretty much like Ernst.
So if the name on the barrel is Jacob Earnest, about the only similarities to his work are sort of the trigger guard and the tang and tang carving, but neither of these is of the quality that Earnest should have done.
And if the barrel name is that of Adam Ernst, he was an excellent York Co maker, and this gun doesn't look like his work either, except maybe the trigger, which isn't as fine as the curled triggers he generally made.
The other choice of maker is in fact Jacob Ernst, possibly the son of Adam Ernst, and he's the one that most likely made your gun. Check out Whiskers York book, pg 61.
Sorry for the confusion!,
John