aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/bdb.cpp
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-07-14 11:26:45 +0200
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-10-26 10:25:22 +0200
commitfa0afe740843c308f6287b923f1f4d758cf2a3f6 (patch)
treef232dd0a3cdf4685532a0a6df5165fe8053d1f25 /src/wallet/bdb.cpp
parent64879f4c03b9d933898c0bb83d9b7e9c20729e51 (diff)
downloadbitcoin-fa0afe740843c308f6287b923f1f4d758cf2a3f6.tar.xz
refactor: Return enum in LockDirectory
This makes it easier to add more Error cases in the future. Also, add missing util namespace.
Diffstat (limited to 'src/wallet/bdb.cpp')
-rw-r--r--src/wallet/bdb.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/bdb.cpp b/src/wallet/bdb.cpp
index 9ea43ca67c..cbf6c9b1ea 100644
--- a/src/wallet/bdb.cpp
+++ b/src/wallet/bdb.cpp
@@ -149,7 +149,7 @@ bool BerkeleyEnvironment::Open(bilingual_str& err)
fs::path pathIn = fs::PathFromString(strPath);
TryCreateDirectories(pathIn);
- if (!LockDirectory(pathIn, ".walletlock")) {
+ if (util::LockDirectory(pathIn, ".walletlock") != util::LockResult::Success) {
LogPrintf("Cannot obtain a lock on wallet directory %s. Another instance may be using it.\n", strPath);
err = strprintf(_("Error initializing wallet database environment %s!"), fs::quoted(fs::PathToString(Directory())));
return false;