diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-02-13 15:49:10 -0500 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-02-13 15:49:13 -0500 |
commit | 9c4a90040dd3d3a5c6737dbb7dee32459f12f4d4 (patch) | |
tree | c5e6cc93068da8f9ee478e0a3cc7344886ca8b8f | |
parent | cbe7efe9ea6c14a3649d3e10f5f18d2097ebef74 (diff) | |
parent | 318b1f7af113fe16b67cf3ed4d9bbab3dd4c5e4e (diff) |
Merge #15390: [wallet-tool] Close bdb when flushing wallet
318b1f7af1 [wallet] Close bdb when flushing wallet. (John Newbery)
Pull request description:
bdb would not be closed when closing the wallet in wallet-tool. Fix this by calling wallet->flush with true.
Tree-SHA512: f722e527e4806eca5254221e944f57853d11bf89a9264309fa558a6cc2b23feefb7bb2963e87b4fad9cfb31ac4cffe563688988e0614a481a8ff1d393aceb132
-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; |