Skip to content

Commit 8a2a030

Browse files
committed
get the error
1 parent 70a3f2d commit 8a2a030

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/wallet/bdb.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ bool BerkeleyDatabase::Verify(bilingual_str& errorStr)
332332
const std::string strFile = fs::PathToString(m_filename);
333333
int result = db.verify(strFile.c_str(), nullptr, nullptr, 0);
334334
if (result != 0) {
335-
errorStr = strprintf(_("%s corrupt. Try using the wallet tool bitcoin-wallet to salvage or restoring a backup."), fs::quoted(fs::PathToString(file_path)));
335+
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);
336336
return false;
337337
}
338338
}

src/wallet/test/fuzz/wallet_bdb_parser.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ FUZZ_TARGET(wallet_bdb_parser, .init = initialize_wallet_bdb_parser)
111111
if (bdb_ro_err && !db) {
112112
return;
113113
}
114+
if (!db) {
115+
std::cout << error.original << std::endl;
116+
throw std::runtime_error(error.original);
117+
}
114118
assert(db);
115119
if (bdb_ro_strict_err) {
116120
// BerkeleyRO will be stricter than BDB. Ignore when those specific errors are hit.

0 commit comments

Comments
 (0)