mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-06 14:19:59 -05:00
refactor: remove unused method CDBWrapper::CompactRange
This method hasn't been used since the txindex migration code has been
removed (PR #22626, commit fa20f815a9
).
Co-authored-by: furszy <matiasfurszyfer@protonmail.com>
This commit is contained in:
parent
fb38c6e21f
commit
e4b4db5610
1 changed files with 0 additions and 16 deletions
|
@ -313,22 +313,6 @@ public:
|
||||||
pdb->GetApproximateSizes(&range, 1, &size);
|
pdb->GetApproximateSizes(&range, 1, &size);
|
||||||
return 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
|
#endif // BITCOIN_DBWRAPPER_H
|
||||||
|
|
Loading…
Add table
Reference in a new issue