check if leveldb is valid correctly

the current check will always succeed.