mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
refactor: Wrap DestroyDB in dbwrapper helper
Wrap leveldb::DestroyDB in a helper function without exposing leveldb-specifics. Also, add missing optional include. The context of this commit is an effort to decouple the dbwrapper header file from leveldb includes. To this end, the includes are moved to the dbwrapper implementation file. This is done as part of the kernel project to reduce the number of required includes for users of the kernel.
This commit is contained in:
parent
42a9110899
commit
afc534df9a
3 changed files with 10 additions and 6 deletions
|
|
@ -5027,7 +5027,7 @@ static bool DeleteCoinsDBFromDisk(const fs::path db_path, bool is_snapshot)
|
|||
|
||||
// We have to destruct before this call leveldb::DB in order to release the db
|
||||
// lock, otherwise `DestroyDB` will fail. See `leveldb::~DBImpl()`.
|
||||
const bool destroyed = dbwrapper::DestroyDB(path_str, {}).ok();
|
||||
const bool destroyed = DestroyDB(path_str);
|
||||
|
||||
if (!destroyed) {
|
||||
LogPrintf("error: leveldb DestroyDB call failed on %s\n", path_str);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue