Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save polarbeard/ccf92c5f83753a03370a to your computer and use it in GitHub Desktop.
Save polarbeard/ccf92c5f83753a03370a to your computer and use it in GitHub Desktop.
diff -uNr a/bitcoin/src/init.cpp b/bitcoin/src/init.cpp
--- a/bitcoin/src/init.cpp 971b82be435c99a1af9d5cacc9c05af7616f4af7ee1466efacd46d41eddc1c4d7da2fdb4a302aab7c99933d33ad2d613f3bfbe76fec67a71c6d4d1fe14ac142d
+++ b/bitcoin/src/init.cpp 3ad5a434f08b5029a39bb0e57216a37ae0047caf1f05cb2984796e9c80fc4ceb9fb9ffe3ca067c9bffb12ffe465e3d92408a79a5e940c66253a358f393b6c29f
@@ -262,8 +262,6 @@
fprintf(stderr, "Error: setsid() returned %d errno %d\n", sid, errno);
}
- if (!fDebug && !pszSetDataDir[0])
- ShrinkDebugFile();
printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
printf("Bitcoin version %s\n", FormatFullVersion().c_str());
printf("Default data directory %s\n", GetDefaultDataDir().c_str());
diff -uNr a/bitcoin/src/util.cpp b/bitcoin/src/util.cpp
--- a/bitcoin/src/util.cpp 66a8ac388136aceac7d24bd73c18b06445c2580849dd6c548d6684b5f1e9c19eafd3f71427476fd982383dcfd0425f34ce524eac1d8320fd990a28a1e4933288
+++ b/bitcoin/src/util.cpp 737f20496467f30d16567d63d809fe08641d524903ae5eb425a9d209da2e9524195d7b3364bf723bce428621344cc6c4861c58d601bfcd93b2af50c537d5d038
@@ -764,35 +764,6 @@
return nFilesize;
}
-void ShrinkDebugFile()
-{
- // Scroll debug.log if it's getting too big
- string strFile = GetDataDir() + "/debug.log";
- FILE* file = fopen(strFile.c_str(), "r");
- if (file && GetFilesize(file) > 10 * 1000000)
- {
- // Restart the file with some of the end
- char pch[200000];
- fseek(file, -sizeof(pch), SEEK_END);
- int nBytes = fread(pch, 1, sizeof(pch), file);
- fclose(file);
-
- file = fopen(strFile.c_str(), "w");
- if (file)
- {
- fwrite(pch, 1, nBytes, file);
- fclose(file);
- }
- }
-}
-
-
-
-
-
-
-
-
//
// "Never go to sea with two chronometers; take one or three."
// Our three time sources are:
diff -uNr a/bitcoin/src/util.h b/bitcoin/src/util.h
--- a/bitcoin/src/util.h f0c21c349b56516feac63c9cf8018c82b26583ad290a4b3610965e5a5a703d116671b1ef270395b8289c170b603630b5b7e493725e420e187ba1fbd326061ff5
+++ b/bitcoin/src/util.h e217371b4da3b8f7b7fb1acd0b281f361de3854e91af884bf70cb39267075a6be1bb504dc9e4d3eebee60ecaf371ac8e83daf88f69569a14c53fb189c4871a9f
@@ -156,7 +156,6 @@
void ReadConfigFile(std::map<std::string, std::string>& mapSettingsRet, std::map<std::string, std::vector<std::string> >& mapMultiSettingsRet);
std::string GetDefaultDataDir();
std::string GetDataDir();
-void ShrinkDebugFile();
int GetRandInt(int nMax);
uint64 GetRand(uint64 nMax);
int64 GetTime();
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJWr1iRAAoJEBHMkEKSnTaCUEYP/2PzhA69BlxMWBx67Ox/OYra
REaudZbIJEPSdw8KZSP/79BhYS1X1eP8UoSOw2hZdEO0a0c1hGU+s0bMZavd/31H
BmbB/BHYb8GWKkq6po7VPTKK9bA8ZVpGGRQSXMsVGJUrPC2nI0Iq0nvjMi87B9jo
c29CGKnXhS1zTg3YFN0xfHUE7ClaJB7miZnlj9R49jZV3w1NrCADmbClhpG/tfch
omc53+YFxm2Hb8+8TxVQi+ES8sviMXo+0RZq8KaHrzRJpFUPq7yW4FyGFZ5ydrVI
KDh23bCv2g5oPoqNRnMBiLMgkYw8l0PHMEq6uTLq869Rv4eV90R/nksFjjpkBNGY
Si4KsBGPdKmlILGxlDaSqmhYBdB8dq497EMTng5Uqbtzc1RReNUHnS0K/52c+kqZ
RD/nCBsbMzcpvYZbbZZ7iyqCIjovUAKZHHvbXlHdS0sjwGsvimsC8IU5ocMS1byw
e/ADjMYlfXQBenaVt3Ele/FWeWZGBeEcjaVd5HHhYCmibpV819qYsBHhzbWndDEn
Joh2BpxQF5iYDy3/lUZ8jnqOM6LV7HqJzl0uZCnQ0BZN9oIx3EWH5rdIokwLo67B
u8hZRTImH6o/R0+QiTUUQhIACHkG5q6IVyy2w07YROS+PYX1+T5sbSiAcqrdYM7f
Dhu4jWhprQQWEbG/MKBG
=K7jk
-----END PGP SIGNATURE-----
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment