Skip to content

Commit

Permalink
update validation.cpp
Browse files Browse the repository at this point in the history
this seems weird? why do we need to reference the specific implementation vs cdbwrapperbase?
  • Loading branch information
josibake committed Sep 17, 2024
1 parent 4b6a89b commit 895c70e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5643,7 +5643,7 @@ Chainstate& ChainstateManager::InitializeChainstate(CTxMemPool* mempool)

// 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 = DestroyDB(path_str);
const bool destroyed = MDBXWrapper::DestroyDB(path_str);

if (!destroyed) {
LogPrintf("error: leveldb DestroyDB call failed on %s\n", path_str);
Expand Down

1 comment on commit 895c70e

@davidgumberg
Copy link

@davidgumberg davidgumberg commented on 895c70e Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both leveldb and mdbx have facilities for deleting all the files they made in a given db context/env, and we use those.

I suppose we could also use the path given at dbwrapperbase creation and then destroy everything in that path but this seems cleaner imo

Please sign in to comment.