message: DRY refactor on dbwrapper Read
diff: @@ -252,20 +252,10 @@ public:
  template <typename K, typename V>
  bool Read(const K &key, V &value) const
  {
  - CDataStream ssKey(SER_DISK, CLIENT_VERSION);
  - ssKey.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
  - ssKey << key;
  - leveldb::Slice slKey(ssKey.data(), ssKey.size());
  -
  std::string strValue;
  - leveldb::Status status = pdb->Get(readoptions, slKey, &strValue);
  - if (!status.ok())
  - {
  - if (status.IsNotFound())
  + if (!Exists(key, strValue))
  return false;
  - LOGA("LevelDB read failure: %s\n", status.ToString());
  - dbwrapper_private::HandleError(status);
  - }
  +
  try
  {
  CDataStream ssValue(strValue.data(), strValue.data() + strValue.size(), SER_DISK, CLIENT_VERSION);
  @@ -288,14 +278,13 @@ public:
  }
  template <typename K>
  - bool Exists(const K &key) const
  + bool Exists(const K &key, std::string &strValue) const
  {
  CDataStream ssKey(SER_DISK, CLIENT_VERSION);
  ssKey.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
  ssKey << key;
  leveldb::Slice slKey(ssKey.data(), ssKey.size());
  - std::string strValue;
  leveldb::Status status = pdb->Get(readoptions, slKey, &strValue);
  if (!status.ok())
  {
  @@ -307,6 +296,13 @@ public:
  return true;
  }
  + template <typename K>
  + bool Exists(const K &key) const
  + {
  + std::string strValue;
  + return Exists(key, strValue);
  + }
  +
  template <typename K>
  bool Erase(const K &key, bool fSync = false)
  {
  