Hey, Daniel.
Patch author here. Thanks for the diligence; I think this indeed may be an oversight, though I'm going to need to look into a bit more thoroughly at home. Curious that it didn't fail any of the automated tests.
Correct me if I'm wrong, but the only actual invocation of that method is
here (and even then, proxied through a few layers of CCoinView-machinery). In fact,
this line makes me suspect that the implementation of GetStats you reference may be dead code.
In any case, you raise a good point: if users of CLevelDBWrapper go directly for the iterator, they run the risk of dealing with obfuscated data. This should be remedied somehow.
I'll give it more look this evening.
Thanks again for the find,
James