diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-07-14 11:26:45 +0200 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-10-26 10:25:22 +0200 |
commit | fa0afe740843c308f6287b923f1f4d758cf2a3f6 (patch) | |
tree | f232dd0a3cdf4685532a0a6df5165fe8053d1f25 /src/wallet/bdb.cpp | |
parent | 64879f4c03b9d933898c0bb83d9b7e9c20729e51 (diff) | |
download | bitcoin-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.cpp | 2 |
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; |