Skip to content

Commit 81c89e9

Browse files
committed
Merge #11923: Wallet : remove unused fNoncriticalErrors variable from CWalletDB::FindWalletTx
ecf9b25 remove unused fNoncriticalErrors variable from CWalletDB::FindWalletTx (Pierre Rochard) Pull request description: The `CWalletDB::FindWalletTx` method was patterned after `CWalletDB::LoadWallet`, where `fNoncriticalErrors` is used when a tx check fails in `ReadKeyValue`. Since `FindWalletTx` is only used by methods which are zapping txs, it makes sense that `ReadKeyValue` is not called and the tx is not checked, so I think that deleting the unused `fNoncriticalErrors` boolean variable and its conditional statement is appropriate. Tree-SHA512: 0976eae97522719fdaeca1fb3f4a080561e46c06d0b8dc75e14262c6bc242998db3f7057183a230a1d7e4ac5fc348e9059f545b7d718ebbcdf6dcdfc63bcc286
2 parents 8049241 + ecf9b25 commit 81c89e9

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/wallet/walletdb.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,6 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
626626

627627
DBErrors CWalletDB::FindWalletTx(std::vector<uint256>& vTxHash, std::vector<CWalletTx>& vWtx)
628628
{
629-
bool fNoncriticalErrors = false;
630629
DBErrors result = DB_LOAD_OK;
631630

632631
try {
@@ -681,9 +680,6 @@ DBErrors CWalletDB::FindWalletTx(std::vector<uint256>& vTxHash, std::vector<CWal
681680
result = DB_CORRUPT;
682681
}
683682

684-
if (fNoncriticalErrors && result == DB_LOAD_OK)
685-
result = DB_NONCRITICAL_ERROR;
686-
687683
return result;
688684
}
689685

0 commit comments

Comments
 (0)