Do not compile BDB things when USE_BDB is defined

This commit is contained in:
Andrew Chow
2020-10-19 15:34:21 -04:00
parent b33af48210
commit a58b719cf7
10 changed files with 64 additions and 8 deletions

View File

@@ -122,6 +122,7 @@ bool ExecuteWalletToolFunc(const std::string& command, const std::string& name)
WalletShowInfo(wallet_instance.get());
wallet_instance->Close();
} else if (command == "salvage") {
#ifdef USE_BDB
bilingual_str error;
std::vector<bilingual_str> warnings;
bool ret = RecoverDatabaseFile(path, error, warnings);
@@ -134,6 +135,10 @@ bool ExecuteWalletToolFunc(const std::string& command, const std::string& name)
}
}
return ret;
#else
tfm::format(std::cerr, "Salvage command is not available as BDB support is not compiled");
return false;
#endif
}
} else {
tfm::format(std::cerr, "Invalid command: %s\n", command);