Jl777 (#1333)
* Slow down clock * Faster and slower * A0/50 * Fix dilithium inputs scan to compare for the voutpubtxids[vout] * Prevent use of uninitialized ignoredAddresses * Filter out amount=0 UTXOs from getsnapshot results * rogue msvc build (#1327) * + msvc 2015 deps headers * + msvc deps build script this script builds only deps, to build rogue binary, open *.sln file in MSVC 2015 and build x64 Release version. * + msvc solution (*.sln) update * + msvc build fix * fix libcurl deps install (msvc) * Fix wrong dilithium compare * Port getchaintxstats from BTC master (#1328) This will allow explorers to present interesting analytics about transaction volume in various time frames. * customcc * Make custom * Syntax * update * Patch rogue msvc (#1330) * + msvc 2015 deps headers * + msvc deps build script this script builds only deps, to build rogue binary, open *.sln file in MSVC 2015 and build x64 Release version. * + msvc solution (*.sln) update * + msvc build fix * fix libcurl deps install (msvc) * [msvc] fix seed str -> uint64 conversion * [msvc] fix config file name issue + debug print for send raw tx * + comment debug printouts * [ msvc ] display compiler version and build date on startup * +pritns * +prints * I, * Print hex * Allow gold mismatch for validate * Stricter player data validation * Change data source * Allow claiming less than cashout value * 50902 exemption * Taxied * Print * Debug file * Log seed * Potion file * ; * Log seed * Commands log * Fp * Test * Prints * static FILE *fp; * Fp2 * Daemons or fuses * Fuse prints * All funcs * Logfp * turn_see is a daemon! * 'void (*)(struct rogue_state *, int) * -prints * -file fp * -potions file * Test * -log * -print replay2 gold * Test * D'oh!
This commit is contained in:
42
src/txdb.cpp
42
src/txdb.cpp
@@ -441,7 +441,7 @@ uint32_t komodo_segid32(char *coinaddr);
|
||||
UniValue CBlockTreeDB::Snapshot(int top)
|
||||
{
|
||||
int64_t total = 0; int64_t totalAddresses = 0; std::string address;
|
||||
int64_t utxos = 0; int64_t ignoredAddresses;
|
||||
int64_t utxos = 0; int64_t ignoredAddresses = 0;
|
||||
boost::scoped_ptr<CDBIterator> iter(NewIterator());
|
||||
std::map <std::string, CAmount> addressAmounts;
|
||||
std::vector <std::pair<CAmount, std::string>> vaddr;
|
||||
@@ -491,27 +491,31 @@ UniValue CBlockTreeDB::Snapshot(int top)
|
||||
|
||||
getAddressFromIndex(indexKey.type, indexKey.hashBytes, address);
|
||||
|
||||
std::map <std::string, int>::iterator ignored = ignoredMap.find(address);
|
||||
if (ignored != ignoredMap.end()) {
|
||||
fprintf(stderr,"ignoring %s\n", address.c_str());
|
||||
ignoredAddresses++;
|
||||
continue;
|
||||
}
|
||||
if (nValue > 0) {
|
||||
std::map <std::string, int>::iterator ignored = ignoredMap.find(address);
|
||||
if (ignored != ignoredMap.end()) {
|
||||
fprintf(stderr,"ignoring %s\n", address.c_str());
|
||||
ignoredAddresses++;
|
||||
continue;
|
||||
}
|
||||
|
||||
std::map <std::string, CAmount>::iterator pos = addressAmounts.find(address);
|
||||
if (pos == addressAmounts.end()) {
|
||||
// insert new address + utxo amount
|
||||
//fprintf(stderr, "inserting new address %s with amount %li\n", address.c_str(), nValue);
|
||||
addressAmounts[address] = nValue;
|
||||
totalAddresses++;
|
||||
std::map <std::string, CAmount>::iterator pos = addressAmounts.find(address);
|
||||
if (pos == addressAmounts.end()) {
|
||||
// insert new address + utxo amount
|
||||
//fprintf(stderr, "inserting new address %s with amount %li\n", address.c_str(), nValue);
|
||||
addressAmounts[address] = nValue;
|
||||
totalAddresses++;
|
||||
} else {
|
||||
// update unspent tally for this address
|
||||
//fprintf(stderr, "updating address %s with new utxo amount %li\n", address.c_str(), nValue);
|
||||
addressAmounts[address] += nValue;
|
||||
}
|
||||
//fprintf(stderr,"{\"%s\", %.8f},\n",address.c_str(),(double)nValue/COIN);
|
||||
// total += nValue;
|
||||
utxos++;
|
||||
} else {
|
||||
// update unspent tally for this address
|
||||
//fprintf(stderr, "updating address %s with new utxo amount %li\n", address.c_str(), nValue);
|
||||
addressAmounts[address] += nValue;
|
||||
fprintf(stderr,"ignoring amount=0 UTXO for %s\n", address.c_str());
|
||||
}
|
||||
//fprintf(stderr,"{\"%s\", %.8f},\n",address.c_str(),(double)nValue/COIN);
|
||||
// total += nValue;
|
||||
utxos++;
|
||||
} catch (const std::exception& e) {
|
||||
fprintf(stderr, "DONE %s: LevelDB addressindex exception! - %s\n", __func__, e.what());
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user