aboutsummaryrefslogtreecommitdiff
path: root/src/dbwrapper.cpp
diff options
context:
space:
mode:
authorTheCharlatan <seb.kung@gmail.com>2023-09-09 13:30:50 +0200
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-09-12 12:07:39 +0200
commit5c2b3cd4b856f1bb536daaf7f576b1b1b42293ca (patch)
tree8146ce8427c3c29edef7ca7dc139a5b2297d20f4 /src/dbwrapper.cpp
parentfd69ffbbfb3e08b474b33540e56cf4f81e5c21d4 (diff)
dbwrapper: Use DataStream for batch operations
Diffstat (limited to 'src/dbwrapper.cpp')
-rw-r--r--src/dbwrapper.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/dbwrapper.cpp b/src/dbwrapper.cpp
index c95937ba75..775496e21b 100644
--- a/src/dbwrapper.cpp
+++ b/src/dbwrapper.cpp
@@ -4,7 +4,6 @@
#include <dbwrapper.h>
-#include <clientversion.h>
#include <logging.h>
#include <random.h>
#include <serialize.h>
@@ -156,9 +155,9 @@ struct CDBBatch::WriteBatchImpl {
leveldb::WriteBatch batch;
};
-CDBBatch::CDBBatch(const CDBWrapper& _parent) : parent(_parent),
- m_impl_batch{std::make_unique<CDBBatch::WriteBatchImpl>()},
- ssValue(SER_DISK, CLIENT_VERSION){};
+CDBBatch::CDBBatch(const CDBWrapper& _parent)
+ : parent{_parent},
+ m_impl_batch{std::make_unique<CDBBatch::WriteBatchImpl>()} {};
CDBBatch::~CDBBatch() = default;
@@ -168,7 +167,7 @@ void CDBBatch::Clear()
size_estimate = 0;
}
-void CDBBatch::WriteImpl(Span<const std::byte> key, CDataStream& ssValue)
+void CDBBatch::WriteImpl(Span<const std::byte> key, DataStream& ssValue)
{
leveldb::Slice slKey(CharCast(key.data()), key.size());
ssValue.Xor(dbwrapper_private::GetObfuscateKey(parent));