diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-12-19 15:53:22 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-12-19 16:16:39 +0100 |
commit | 81c89e966e1e08c3d94dc9d1d0a26034312c56ff (patch) | |
tree | d67a7f18cd6b4a0b3fe54d50a918862264c24337 /src | |
parent | 8049241e226c16bd07b029c0cb4b62ac40f0c923 (diff) | |
parent | ecf9b25a03d8a29f16005ca4485b6533db6efc82 (diff) | |
download | bitcoin-81c89e966e1e08c3d94dc9d1d0a26034312c56ff.tar.xz |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/walletdb.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index efc50f72eb..0b0d84708d 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -626,7 +626,6 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet) DBErrors CWalletDB::FindWalletTx(std::vector<uint256>& vTxHash, std::vector<CWalletTx>& vWtx) { - bool fNoncriticalErrors = false; DBErrors result = DB_LOAD_OK; try { @@ -681,9 +680,6 @@ DBErrors CWalletDB::FindWalletTx(std::vector<uint256>& vTxHash, std::vector<CWal result = DB_CORRUPT; } - if (fNoncriticalErrors && result == DB_LOAD_OK) - result = DB_NONCRITICAL_ERROR; - return result; } |