Yahweh restored David to the measure of his righteousness because he kept himself from sin. [22:24-25]