The Lord rewarded me according to my righteousness. David has spoken of his "righteousness" already in Psalms 7:8. We must not suppose him to mean absolute blamelessness, any more than Job means such blamelessness by his "integrity" (Job 27:5; Job 31:6).
He means honesty of purpose, the sincere endeavour to do right, such conduct as brings about "the answer of a good conscience before God" (1 Peter 3:21). According to the cleanness of my hands hath he recompensed me (comp.
Job 27:9; Psalms 24:4). "Clean hands" are hands unstained by any wicked action.