Do not rewrite dumpfile before blocking
This commit is contained in:
parent
d25302b565
commit
2f65b2adaa
1 changed files with 2 additions and 2 deletions
4
main.cpp
4
main.cpp
|
@ -270,6 +270,8 @@ extern "C" void* ThreadDumper(void*) {
|
|||
do {
|
||||
Sleep(100000);
|
||||
{
|
||||
vector<CAddrReport> v = db.GetAll();
|
||||
sort(v.begin(), v.end(), StatCompare);
|
||||
FILE *f = fopen("dnsseed.dat.new","w+");
|
||||
if (f) {
|
||||
{
|
||||
|
@ -279,8 +281,6 @@ extern "C" void* ThreadDumper(void*) {
|
|||
rename("dnsseed.dat.new", "dnsseed.dat");
|
||||
}
|
||||
FILE *d = fopen("dnsseed.dump", "w");
|
||||
vector<CAddrReport> v = db.GetAll();
|
||||
sort(v.begin(), v.end(), StatCompare);
|
||||
fprintf(d, "# address \t%%(2h)\t%%(8h)\t%%(1d)\t%%(7d)\t%%(30d)\tblocks\tversion\n");
|
||||
double stat[5]={0,0,0,0,0};
|
||||
for (vector<CAddrReport>::const_iterator it = v.begin(); it < v.end(); it++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue