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& mapSettingsRet, std::map >& mapMultiSettingsRet); std::string GetDefaultDataDir(); std::string GetDataDir(); -void ShrinkDebugFile(); int GetRandInt(int nMax); uint64 GetRand(uint64 nMax); int64 GetTime();