Skip to content

Commit b446236

Browse files
laanwjPastaPastaPasta
authored andcommitted
Merge bitcoin#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
1 parent e077cfd commit b446236

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
@@ -665,7 +665,6 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
665665

666666
DBErrors CWalletDB::FindWalletTx(std::vector<uint256>& vTxHash, std::vector<CWalletTx>& vWtx)
667667
{
668-
bool fNoncriticalErrors = false;
669668
DBErrors result = DB_LOAD_OK;
670669

671670
try {
@@ -720,9 +719,6 @@ DBErrors CWalletDB::FindWalletTx(std::vector<uint256>& vTxHash, std::vector<CWal
720719
result = DB_CORRUPT;
721720
}
722721

723-
if (fNoncriticalErrors && result == DB_LOAD_OK)
724-
result = DB_NONCRITICAL_ERROR;
725-
726722
return result;
727723
}
728724

0 commit comments

Comments
 (0)