Skip to content

Commit 65460c2

Browse files
author
MarcoFalke
committed
Merge #20324: wallet: Set DatabaseStatus::SUCCESS in MakeSQLiteDatabase
faf5fa7 wallet: Set DatabaseStatus::SUCCESS in MakeSQLiteDatabase (MarcoFalke) Pull request description: This is a refactor to set the status to `SUCCESS` (like it is done in `MakeBerkeleyDatabase`, too). It also happens to fix a false positive valgrind warning (tested with bionic-gcc and focal-clang): ``` node1 stderr ==28149== Conditional jump or move depends on uninitialised value(s) ==28149== at 0x464471: LoadWallets(interfaces::Chain&) (load.cpp:105) ==28149== by 0x44BFBA: interfaces::(anonymous namespace)::WalletClientImpl::load() (wallet.cpp:510) ==28149== by 0x1640F9: AppInitMain(util::Ref const&, NodeContext&, interfaces::BlockAndHeaderTipInfo*) (init.cpp:1815) ==28149== by 0x144F3F: AppInit (bitcoind.cpp:142) ==28149== by 0x144F3F: main (bitcoind.cpp:172) ==28149== { <insert_a_suppression_name_here> Memcheck:Cond fun:_Z11LoadWalletsRN10interfaces5ChainE fun:_ZN10interfaces12_GLOBAL__N_116WalletClientImpl4loadEv fun:_Z11AppInitMainRKN4util3RefER11NodeContextPN10interfaces21BlockAndHeaderTipInfoE fun:AppInit fun:main } TEST | STATUS | DURATION wallet_hd.py --descriptors | ✖ Failed | 69 s ``` ACKs for top commit: achow101: ACK faf5fa7 Tree-SHA512: e8cbac195d05518467f89725d413bdf226d74671eba1c1eb80b3a61d65724af75a1fe93bcb5c608eaa0d54eddce992738bd923e7d83e493f54c3f4c67b66408c
2 parents f5cdc29 + faf5fa7 commit 65460c2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/wallet/sqlite.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,7 @@ std::unique_ptr<SQLiteDatabase> MakeSQLiteDatabase(const fs::path& path, const D
581581
status = DatabaseStatus::FAILED_VERIFY;
582582
return nullptr;
583583
}
584+
status = DatabaseStatus::SUCCESS;
584585
return db;
585586
} catch (const std::runtime_error& e) {
586587
status = DatabaseStatus::FAILED_LOAD;

0 commit comments

Comments
 (0)