diff options
| author | Pieter Wuille <[email protected]> | 2016-08-29 16:15:42 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-08-29 16:16:23 +0200 |
| commit | 01680195f8aa586c55c44767397380def3a23b54 (patch) | |
| tree | 8f1ca739993eabde6a9c2cd654216578fdc5ceec /src/wallet/walletdb.cpp | |
| parent | Merge #8607: [doc] Fix doxygen off-by-one comments, fix typos (diff) | |
| parent | [Wallet] remove unused code/conditions in ReadAtCursor (diff) | |
| download | discoin-01680195f8aa586c55c44767397380def3a23b54.tar.xz discoin-01680195f8aa586c55c44767397380def3a23b54.zip | |
Merge #8564: [Wallet] remove unused code/conditions in ReadAtCursor
beef966 [Wallet] remove unused code/conditions in ReadAtCursor (Jonas Schnelli)
Diffstat (limited to 'src/wallet/walletdb.cpp')
| -rw-r--r-- | src/wallet/walletdb.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index e6e9fc484..9de0671ea 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -216,16 +216,16 @@ void CWalletDB::ListAccountCreditDebit(const string& strAccount, list<CAccountin Dbc* pcursor = GetCursor(); if (!pcursor) throw runtime_error(std::string(__func__) + ": cannot create DB cursor"); - unsigned int fFlags = DB_SET_RANGE; + bool setRange = true; while (true) { // Read next record CDataStream ssKey(SER_DISK, CLIENT_VERSION); - if (fFlags == DB_SET_RANGE) + if (setRange) ssKey << std::make_pair(std::string("acentry"), std::make_pair((fAllAccounts ? string("") : strAccount), uint64_t(0))); CDataStream ssValue(SER_DISK, CLIENT_VERSION); - int ret = ReadAtCursor(pcursor, ssKey, ssValue, fFlags); - fFlags = DB_NEXT; + int ret = ReadAtCursor(pcursor, ssKey, ssValue, setRange); + setRange = false; if (ret == DB_NOTFOUND) break; else if (ret != 0) |