diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2012-05-19 05:48:48 -0700 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2012-05-19 05:48:48 -0700 |
commit | 973ca019bce58fab7a100b08381050ad2c5eb3ef (patch) | |
tree | 22bda502cb448728c52233a5887d957d72e1e7b2 /src | |
parent | 23e5c5b11a746be74430eae103fd2cd866ce6bea (diff) | |
parent | 966ae00fe4b7c8420b6a1cfe3aa30fca4410a0e8 (diff) |
Merge pull request #1296 from Diapolo/CheckDiskSpace
make CheckDiskSpace() use 50 * 1024 * 1024 Bytes
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 6 | ||||
-rw-r--r-- | src/main.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main.cpp b/src/main.cpp index e19d0e4de5..8ff6d6fec0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1851,11 +1851,11 @@ bool CheckDiskSpace(uint64 nAdditionalBytes) { uint64 nFreeBytesAvailable = filesystem::space(GetDataDir()).available; - // Check for 15MB because database could create another 10MB log file at any time - if (nFreeBytesAvailable < (uint64)15000000 + nAdditionalBytes) + // Check for nMinDiskSpace bytes (currently 50MB) + if (nFreeBytesAvailable < nMinDiskSpace + nAdditionalBytes) { fShutdown = true; - string strMessage = _("Warning: Disk space is low "); + string strMessage = _("Warning: Disk space is low"); strMiscWarning = strMessage; printf("*** %s\n", strMessage.c_str()); ThreadSafeMessageBox(strMessage, "Bitcoin", wxOK | wxICON_EXCLAMATION | wxMODAL); diff --git a/src/main.h b/src/main.h index 3da2e0c5b3..9700909f8b 100644 --- a/src/main.h +++ b/src/main.h @@ -71,8 +71,8 @@ extern unsigned char pchMessageStart[4]; // Settings extern int64 nTransactionFee; - - +// Minimum disk space required - used in CheckDiskSpace() +static const uint64 nMinDiskSpace = 52428800; class CReserveKey; |