#include "paymentdisclosuredb.h"
#include "util.h"
-#include "leveldbwrapper.h"
+#include "dbwrapper.h"
#include <boost/filesystem.hpp>
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");
}
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;
}
if (status.IsNotFound())
return false;
LogPrintf("PaymentDisclosure: LevelDB read failure: %s\n", status.ToString());
- HandleError(status);
+ dbwrapper_private::HandleError(status);
}
try {