Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
| Show First 20 Lines • Show All 2,138 Lines • ▼ Show 20 Lines | try { | ||||
| // Finally remove any pruned files | // Finally remove any pruned files | ||||
| if (fFlushForPrune) { | if (fFlushForPrune) { | ||||
| UnlinkPrunedFiles(setFilesToPrune); | UnlinkPrunedFiles(setFilesToPrune); | ||||
| } | } | ||||
| nLastWrite = nNow; | nLastWrite = nNow; | ||||
| } | } | ||||
| // Flush best chain related state. This can only be done if the | // Flush best chain related state. This can only be done if the | ||||
| // blocks / block index write was also done. | // blocks / block index write was also done. | ||||
| if (fDoFullFlush) { | if (fDoFullFlush && !pcoinsTip->GetBestBlock().IsNull()) { | ||||
| // Typical Coin structures on disk are around 48 bytes in size. | // Typical Coin structures on disk are around 48 bytes in size. | ||||
| // Pushing a new one to the database can cause it to be written | // Pushing a new one to the database can cause it to be written | ||||
| // twice (once in the log, and once in the tables). This is | // twice (once in the log, and once in the tables). This is | ||||
| // already an overestimation, as most will delete an existing | // already an overestimation, as most will delete an existing | ||||
| // entry or overwrite one. Still, use a conservative safety | // entry or overwrite one. Still, use a conservative safety | ||||
| // factor of 2. | // factor of 2. | ||||
| if (!CheckDiskSpace(48 * 2 * 2 * pcoinsTip->GetCacheSize())) { | if (!CheckDiskSpace(48 * 2 * 2 * pcoinsTip->GetCacheSize())) { | ||||
| return state.Error("out of disk space"); | return state.Error("out of disk space"); | ||||
| ▲ Show 20 Lines • Show All 3,567 Lines • Show Last 20 Lines | |||||