Skip to content

Commit e4b4db5

Browse files
theStackfurszy
andcommitted
refactor: remove unused method CDBWrapper::CompactRange
This method hasn't been used since the txindex migration code has been removed (PR #22626, commit fa20f81). Co-authored-by: furszy <[email protected]>
1 parent fb38c6e commit e4b4db5

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/dbwrapper.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -313,22 +313,6 @@ class CDBWrapper
313313
pdb->GetApproximateSizes(&range, 1, &size);
314314
return size;
315315
}
316-
317-
/**
318-
* Compact a certain range of keys in the database.
319-
*/
320-
template<typename K>
321-
void CompactRange(const K& key_begin, const K& key_end) const
322-
{
323-
CDataStream ssKey1(SER_DISK, CLIENT_VERSION), ssKey2(SER_DISK, CLIENT_VERSION);
324-
ssKey1.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
325-
ssKey2.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
326-
ssKey1 << key_begin;
327-
ssKey2 << key_end;
328-
leveldb::Slice slKey1((const char*)ssKey1.data(), ssKey1.size());
329-
leveldb::Slice slKey2((const char*)ssKey2.data(), ssKey2.size());
330-
pdb->CompactRange(&slKey1, &slKey2);
331-
}
332316
};
333317

334318
#endif // BITCOIN_DBWRAPPER_H

0 commit comments

Comments
 (0)