aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallettool.cpp
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2020-06-15 17:59:24 -0400
committerAndrew Chow <achow101-github@achow101.com>2020-07-14 11:07:16 -0400
commit27b27663849932971eb5deadb1f19234b9cd97ea (patch)
treef8fa0655e170c4c2b1edbc7eaa440cdc101295a7 /src/wallet/wallettool.cpp
parent834ac4c0f50c0795b55f5586ecc4b1db251be58d (diff)
walletdb: Move BerkeleyDatabase::Flush(true) to Close()
Instead of having Flush optionally shutdown the database and environment, add a Close() function that does that.
Diffstat (limited to 'src/wallet/wallettool.cpp')
-rw-r--r--src/wallet/wallettool.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/wallettool.cpp b/src/wallet/wallettool.cpp
index 8a45d81456..9f25b1ae7d 100644
--- a/src/wallet/wallettool.cpp
+++ b/src/wallet/wallettool.cpp
@@ -17,7 +17,7 @@ namespace WalletTool {
static void WalletToolReleaseWallet(CWallet* wallet)
{
wallet->WalletLogPrintf("Releasing wallet\n");
- wallet->Flush(true);
+ wallet->Close();
delete wallet;
}
@@ -133,7 +133,7 @@ bool ExecuteWalletToolFunc(const std::string& command, const std::string& name)
std::shared_ptr<CWallet> wallet_instance = CreateWallet(name, path);
if (wallet_instance) {
WalletShowInfo(wallet_instance.get());
- wallet_instance->Flush(true);
+ wallet_instance->Close();
}
} else if (command == "info" || command == "salvage") {
if (!fs::exists(path)) {
@@ -145,7 +145,7 @@ bool ExecuteWalletToolFunc(const std::string& command, const std::string& name)
std::shared_ptr<CWallet> wallet_instance = LoadWallet(name, path);
if (!wallet_instance) return false;
WalletShowInfo(wallet_instance.get());
- wallet_instance->Flush(true);
+ wallet_instance->Close();
} else if (command == "salvage") {
return SalvageWallet(path);
}