aboutsummaryrefslogtreecommitdiff
path: root/src/dbwrapper.h
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2022-06-23 11:47:17 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2022-06-23 13:59:25 +0200
commite4b4db561049c97c956e5b856713dcf63ac3e2f0 (patch)
treee47862b919d6b18ccbefaedfe840390dea093c5c /src/dbwrapper.h
parentfb38c6e21f064e23b63a46d15adb873029463cff (diff)
downloadbitcoin-e4b4db561049c97c956e5b856713dcf63ac3e2f0.tar.xz
refactor: remove unused method `CDBWrapper::CompactRange`
This method hasn't been used since the txindex migration code has been removed (PR #22626, commit fa20f815a9cb438c5ab61e97a453612ddd8b21b5). Co-authored-by: furszy <matiasfurszyfer@protonmail.com>
Diffstat (limited to 'src/dbwrapper.h')
-rw-r--r--src/dbwrapper.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/dbwrapper.h b/src/dbwrapper.h
index bcc06e27bd..cef8426d61 100644
--- a/src/dbwrapper.h
+++ b/src/dbwrapper.h
@@ -313,22 +313,6 @@ public:
pdb->GetApproximateSizes(&range, 1, &size);
return size;
}
-
- /**
- * Compact a certain range of keys in the database.
- */
- template<typename K>
- void CompactRange(const K& key_begin, const K& key_end) const
- {
- CDataStream ssKey1(SER_DISK, CLIENT_VERSION), ssKey2(SER_DISK, CLIENT_VERSION);
- ssKey1.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
- ssKey2.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
- ssKey1 << key_begin;
- ssKey2 << key_end;
- leveldb::Slice slKey1((const char*)ssKey1.data(), ssKey1.size());
- leveldb::Slice slKey2((const char*)ssKey2.data(), ssKey2.size());
- pdb->CompactRange(&slKey1, &slKey2);
- }
};
#endif // BITCOIN_DBWRAPPER_H