After commit ccd85b57af60d7034db372b9501d059fbc5941e4 I can no longer open my wallet without warnings.

![Screenshot from 2020-05-22 10-45-35](https://user-images.githubusercontent.com/6399679/82679920-9704a180-9c19-11ea-8f55-4c935ced8fe2.png)

```
Warning: Error reading /home/marco/.bitcoin/regtest/wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.

while (true)
        {
            
            CDataStream ssKey(SER_DISK, CLIENT_VERSION);
            CDataStream ssValue(SER_DISK, CLIENT_VERSION);
            int ret = m_batch.ReadAtCursor(pcursor, ssKey, ssValue);
            if (ret == DB_NOTFOUND)
                break;
            else if (ret != 0)
            {
                LogPrintf("Error reading next record from wallet database\n");
                return DBErrors::CORRUPT;
            }
            std::string strType;
            ssKey >> strType;
            if (strType == DBKeys::TX) {
                uint256 hash;
                ssKey >> hash;
                vTxHash.push_back(hash);
                vWtx.emplace_back(nullptr , nullptr );
                ssValue >> vWtx.back();
            }
        }
        pcursor->close();
    } catch (...) {
        result = DBErrors::CORRUPT;
    }
    return result;
}
DBErrors WalletBatch::ZapSelectTx(std::vector<uint256>& vTxHashIn, std::vector<uint256>& vTxHashOut)