diff --git a/src/wallet/bdb.cpp b/src/wallet/bdb.cpp index d82d8d451319d..c4e5c91a9457e 100644 --- a/src/wallet/bdb.cpp +++ b/src/wallet/bdb.cpp @@ -332,7 +332,7 @@ bool BerkeleyDatabase::Verify(bilingual_str& errorStr) const std::string strFile = fs::PathToString(m_filename); int result = db.verify(strFile.c_str(), nullptr, nullptr, 0); if (result != 0) { - errorStr = strprintf(_("%s corrupt. Try using the wallet tool bitcoin-wallet to salvage or restoring a backup."), fs::quoted(fs::PathToString(file_path))); + errorStr = strprintf(_("%s corrupt (%d). Try using the wallet tool bitcoin-wallet to salvage or restoring a backup."), fs::quoted(fs::PathToString(file_path)), result); return false; } } diff --git a/src/wallet/test/fuzz/wallet_bdb_parser.cpp b/src/wallet/test/fuzz/wallet_bdb_parser.cpp index 6fbd695fc5ee2..51995f0d77592 100644 --- a/src/wallet/test/fuzz/wallet_bdb_parser.cpp +++ b/src/wallet/test/fuzz/wallet_bdb_parser.cpp @@ -111,6 +111,10 @@ FUZZ_TARGET(wallet_bdb_parser, .init = initialize_wallet_bdb_parser) if (bdb_ro_err && !db) { return; } + if (!db) { + std::cout << error.original << std::endl; + throw std::runtime_error(error.original); + } assert(db); if (bdb_ro_strict_err) { // BerkeleyRO will be stricter than BDB. Ignore when those specific errors are hit.