]> Git Repo - VerusCoin.git/blobdiff - src/paymentdisclosuredb.cpp
Merge pull request #128 from miketout/dev
[VerusCoin.git] / src / paymentdisclosuredb.cpp
index ef32f28458be37d4def57b4104d778aea55efa6b..8840dcda004359c816a41704a46c1b13be25ce45 100644 (file)
@@ -5,7 +5,7 @@
 #include "paymentdisclosuredb.h"
 
 #include "util.h"
-#include "leveldbwrapper.h"
+#include "dbwrapper.h"
 
 #include <boost/filesystem.hpp>
 
@@ -38,7 +38,7 @@ PaymentDisclosureDB::PaymentDisclosureDB(const boost::filesystem::path& dbPath)
     TryCreateDirectory(path);
     options.create_if_missing = true;
     leveldb::Status status = leveldb::DB::Open(options, path.string(), &db);
-    HandleError(status); // throws exception
+    dbwrapper_private::HandleError(status); // throws exception
     LogPrintf("PaymentDisclosure: Opened LevelDB successfully\n");
 }
 
@@ -57,12 +57,12 @@ bool PaymentDisclosureDB::Put(const PaymentDisclosureKey& key, const PaymentDisc
     std::lock_guard<std::mutex> guard(lock_);
 
     CDataStream ssValue(SER_DISK, CLIENT_VERSION);
-    ssValue.reserve(ssValue.GetSerializeSize(info));
+    ssValue.reserve(GetSerializeSize(ssValue, info));
     ssValue << info;
     leveldb::Slice slice(&ssValue[0], ssValue.size());
 
     leveldb::Status status = db->Put(writeOptions, key.ToString(), slice);
-    HandleError(status);
+    dbwrapper_private::HandleError(status);
     return true;
 }
 
@@ -80,7 +80,7 @@ bool PaymentDisclosureDB::Get(const PaymentDisclosureKey& key, PaymentDisclosure
         if (status.IsNotFound())
             return false;
         LogPrintf("PaymentDisclosure: LevelDB read failure: %s\n", status.ToString());
-        HandleError(status);
+        dbwrapper_private::HandleError(status);
     }
 
     try {
This page took 0.024001 seconds and 4 git commands to generate.