diff --git a/src/txdb.cpp b/src/txdb.cpp index cb853331f..abea9a018 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -424,7 +424,8 @@ bool getAddressFromIndex(const int &type, const uint160 &hash, std::string &addr UniValue CBlockTreeDB::Snapshot(int top) { - char chType; int64_t total = 0; int64_t totalAddresses = 0; std::string address; + //char chType; + int64_t total = 0; int64_t totalAddresses = 0; std::string address; int64_t utxos = 0; int64_t ignoredAddresses; boost::scoped_ptr iter(NewIterator()); std::map addressAmounts; @@ -459,15 +460,20 @@ UniValue CBlockTreeDB::Snapshot(int top) boost::this_thread::interruption_point(); try { - std::vector slKey = std::vector(); + /*std::vector slKey = std::vector(); iter->GetKey(slKey); CDataStream ssKey(slKey, SER_DISK, CLIENT_VERSION); CAddressIndexIteratorKey indexKey; ssKey >> chType; - ssKey >> indexKey; + ssKey >> indexKey;*/ - //fprintf(stderr, "chType=%d\n", chType); + pair keyObj; + iter->GetKey(keyObj); + char chType = keyObj.first; + CAddressIndexKey indexKey = keyObj.second; + + fprintf(stderr, "chType=%d\n", chType); if (chType == DB_ADDRESSUNSPENTINDEX) { try {