This commit is contained in:
jl777
2018-06-12 00:10:37 -11:00
parent b4b4c49985
commit bd14699824

View File

@@ -396,6 +396,8 @@ bool CBlockTreeDB::ReadAddressIndex(uint160 addressHash, int type,
return true; return true;
} }
bool getAddressFromIndex(const int &type, const uint160 &hash, std::string &address);
int32_t CBlockTreeDB::SnapShot() int32_t CBlockTreeDB::SnapShot()
{ {
char chType; int32_t num = 0; std::string address; char chType; int32_t num = 0; std::string address;
@@ -417,7 +419,7 @@ int32_t CBlockTreeDB::SnapShot()
CDataStream ssValue(slValue.data(), slValue.data()+slValue.size(), SER_DISK, CLIENT_VERSION); CDataStream ssValue(slValue.data(), slValue.data()+slValue.size(), SER_DISK, CLIENT_VERSION);
CAmount nValue; CAmount nValue;
ssValue >> nValue; ssValue >> nValue;
getAddressFromIndex(indexKey.type, indexKey.addressBytes, address); getAddressFromIndex(indexKey.type, indexKey.hashBytes, address);
fprintf(stderr,"{\"%s\", %.8f},\n",address.c_str(),(double)nValue/COIN); fprintf(stderr,"{\"%s\", %.8f},\n",address.c_str(),(double)nValue/COIN);
num++; num++;
//addressIndex.push_back(make_pair(indexKey, nValue)); //addressIndex.push_back(make_pair(indexKey, nValue));