From 6651944ae70065fa8f4a93c4fb81d2263d04f360 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 14 Jul 2018 23:59:08 -1100 Subject: [PATCH] Test --- src/txdb.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/txdb.cpp b/src/txdb.cpp index ae15d37e1..31af362ac 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -400,7 +400,7 @@ bool getAddressFromIndex(const int &type, const uint160 &hash, std::string &addr int64_t CBlockTreeDB::Snapshot() { - char chType; int64_t total = -1; std::string address; + char chType; int64_t total = 0; std::string address; boost::scoped_ptr pcursor(NewIterator()); pcursor->SeekToLast(); fprintf(stderr,"pcursor iterate\n"); @@ -428,7 +428,6 @@ int64_t CBlockTreeDB::Snapshot() total = (int64_t)nValue; else total += (int64_t)nValue; //addressIndex.push_back(make_pair(indexKey, nValue)); - pcursor->Prev(); } catch (const std::exception& e) { return error("failed to get address index value"); } @@ -436,6 +435,7 @@ int64_t CBlockTreeDB::Snapshot() } catch (const std::exception& e) { break; } + pcursor->Prev(); } return(total); }