diff options
author | TheCharlatan <seb.kung@gmail.com> | 2023-07-13 21:17:45 +0200 |
---|---|---|
committer | TheCharlatan <seb.kung@gmail.com> | 2023-08-01 22:14:15 +0200 |
commit | afc534df9adbf5599b286b5dc3531a4b9ac2d056 (patch) | |
tree | 6a4c255643b3dfe01d641dc2a7776564b84af531 /src/validation.cpp | |
parent | 42a9110899a9020417f0397456168aea6ac6ade9 (diff) | |
download | bitcoin-afc534df9adbf5599b286b5dc3531a4b9ac2d056.tar.xz |
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.
Diffstat (limited to 'src/validation.cpp')
-rw-r--r-- | src/validation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index e6def01db5..e4b5381f00 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -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); |