- 66A8AC388136ACEAC7D24BD73C18B06445C2580849DD6C548D6684B5F1E9C19EAFD3F71427476FD982383DCFD0425F34CE524EAC1D8320FD990A28A1E4933288
+ 737F20496467F30D16567D63D809FE08641D524903AE5EB425A9D209DA2E9524195D7B3364BF723BCE428621344CC6C4861C58D601BFCD93B2AF50C537D5D038
bitcoin/src/util.cpp
(764 . 35)(764 . 6)
17 return nFilesize;
18 }
19
20 void ShrinkDebugFile()
21 {
22 // Scroll debug.log if it's getting too big
23 string strFile = GetDataDir() + "/debug.log";
24 FILE* file = fopen(strFile.c_str(), "r");
25 if (file && GetFilesize(file) > 10 * 1000000)
26 {
27 // Restart the file with some of the end
28 char pch[200000];
29 fseek(file, -sizeof(pch), SEEK_END);
30 int nBytes = fread(pch, 1, sizeof(pch), file);
31 fclose(file);
32
33 file = fopen(strFile.c_str(), "w");
34 if (file)
35 {
36 fwrite(pch, 1, nBytes, file);
37 fclose(file);
38 }
39 }
40 }
41
42
43
44
45
46
47
48
49 //
50 // "Never go to sea with two chronometers; take one or three."
51 // Our three time sources are: