DUMP FORMAT CHANGE: Include service flags in dnsseed.dump as hex
This commit is contained in:
parent
bfc7d2f9ef
commit
e3a5f2f325
2 changed files with 4 additions and 2 deletions
2
db.h
2
db.h
|
@ -54,6 +54,7 @@ public:
|
|||
std::string clientSubVersion;
|
||||
int64_t lastSuccess;
|
||||
bool fGood;
|
||||
uint64_t services;
|
||||
};
|
||||
|
||||
|
||||
|
@ -91,6 +92,7 @@ public:
|
|||
ret.uptime[4] = stat1M.reliability;
|
||||
ret.lastSuccess = ourLastSuccess;
|
||||
ret.fGood = IsGood();
|
||||
ret.services = services;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
4
main.cpp
4
main.cpp
|
@ -283,11 +283,11 @@ extern "C" void* ThreadDumper(void*) {
|
|||
rename("dnsseed.dat.new", "dnsseed.dat");
|
||||
}
|
||||
FILE *d = fopen("dnsseed.dump", "w");
|
||||
fprintf(d, "# address \tgood\tlastSuccess\t%%(2h)\t%%(8h)\t%%(1d)\t%%(7d)\t%%(30d)\tblocks\tversion\n");
|
||||
fprintf(d, "# address \tgood\tlastSuccess\t%%(2h)\t%%(8h)\t%%(1d)\t%%(7d)\t%%(30d)\tblocks\tsvcs\tversion\n");
|
||||
double stat[5]={0,0,0,0,0};
|
||||
for (vector<CAddrReport>::const_iterator it = v.begin(); it < v.end(); it++) {
|
||||
CAddrReport rep = *it;
|
||||
fprintf(d, "%s\t%d\t%"PRId64"\t%.2f%%\t%.2f%%\t%.2f%%\t%.2f%%\t%.2f%%\t%i\t%i \"%s\"\n", rep.ip.ToString().c_str(), (int)rep.fGood, rep.lastSuccess, 100.0*rep.uptime[0], 100.0*rep.uptime[1], 100.0*rep.uptime[2], 100.0*rep.uptime[3], 100.0*rep.uptime[4], rep.blocks, rep.clientVersion, rep.clientSubVersion.c_str());
|
||||
fprintf(d, "%s\t%d\t%"PRId64"\t%.2f%%\t%.2f%%\t%.2f%%\t%.2f%%\t%.2f%%\t%i\t%"PRIx64"\t%i \"%s\"\n", rep.ip.ToString().c_str(), (int)rep.fGood, rep.lastSuccess, 100.0*rep.uptime[0], 100.0*rep.uptime[1], 100.0*rep.uptime[2], 100.0*rep.uptime[3], 100.0*rep.uptime[4], rep.blocks, rep.services, rep.clientVersion, rep.clientSubVersion.c_str());
|
||||
stat[0] += rep.uptime[0];
|
||||
stat[1] += rep.uptime[1];
|
||||
stat[2] += rep.uptime[2];
|
||||
|
|
Loading…
Reference in a new issue