diff options
author | John Newbery <john@johnnewbery.com> | 2019-02-12 12:54:38 -0500 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2019-02-12 13:27:18 -0500 |
commit | 318b1f7af113fe16b67cf3ed4d9bbab3dd4c5e4e (patch) | |
tree | 0df44d96665551a06aa7ad25bac2b15ff62135bf /src/wallet | |
parent | 65435701efdafc6b91db542327c57c69386f02eb (diff) |
[wallet] Close bdb when flushing wallet.
bdb would not be closed when closing the wallet in wallet-tool. Fix this
by calling wallet->flush with true.
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallettool.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/wallettool.cpp b/src/wallet/wallettool.cpp index 628f3fe803..797f051189 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(); + wallet->Flush(true); delete wallet; } @@ -112,7 +112,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(); + wallet_instance->Flush(true); } } else if (command == "info") { if (!fs::exists(path)) { @@ -127,7 +127,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(); + wallet_instance->Flush(true); } else { fprintf(stderr, "Invalid command: %s\n", command.c_str()); return false; |