Test
This commit is contained in:
14
src/txdb.cpp
14
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<CDBIterator> iter(NewIterator());
|
||||
std::map <std::string, CAmount> addressAmounts;
|
||||
@@ -459,15 +460,20 @@ UniValue CBlockTreeDB::Snapshot(int top)
|
||||
boost::this_thread::interruption_point();
|
||||
try
|
||||
{
|
||||
std::vector<unsigned char> slKey = std::vector<unsigned char>();
|
||||
/*std::vector<unsigned char> slKey = std::vector<unsigned char>();
|
||||
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<char, CAddressIndexKey> keyObj;
|
||||
iter->GetKey(keyObj);
|
||||
char chType = keyObj.first;
|
||||
CAddressIndexKey indexKey = keyObj.second;
|
||||
|
||||
fprintf(stderr, "chType=%d\n", chType);
|
||||
if (chType == DB_ADDRESSUNSPENTINDEX)
|
||||
{
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user