Skip to content

Commit 9c4a900

Browse files
author
MarcoFalke
committed
Merge #15390: [wallet-tool] Close bdb when flushing wallet
318b1f7 [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
2 parents cbe7efe + 318b1f7 commit 9c4a900

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/wallet/wallettool.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace WalletTool {
1717
static void WalletToolReleaseWallet(CWallet* wallet)
1818
{
1919
wallet->WalletLogPrintf("Releasing wallet\n");
20-
wallet->Flush();
20+
wallet->Flush(true);
2121
delete wallet;
2222
}
2323

@@ -112,7 +112,7 @@ bool ExecuteWalletToolFunc(const std::string& command, const std::string& name)
112112
std::shared_ptr<CWallet> wallet_instance = CreateWallet(name, path);
113113
if (wallet_instance) {
114114
WalletShowInfo(wallet_instance.get());
115-
wallet_instance->Flush();
115+
wallet_instance->Flush(true);
116116
}
117117
} else if (command == "info") {
118118
if (!fs::exists(path)) {
@@ -127,7 +127,7 @@ bool ExecuteWalletToolFunc(const std::string& command, const std::string& name)
127127
std::shared_ptr<CWallet> wallet_instance = LoadWallet(name, path);
128128
if (!wallet_instance) return false;
129129
WalletShowInfo(wallet_instance.get());
130-
wallet_instance->Flush();
130+
wallet_instance->Flush(true);
131131
} else {
132132
fprintf(stderr, "Invalid command: %s\n", command.c_str());
133133
return false;

0 commit comments

Comments
 (0)