aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorshshshsh <[email protected]>2014-05-30 12:35:23 +0000
committershshshsh <[email protected]>2014-06-04 11:58:18 +0000
commit7b45d943b29a443f1ac808c9ee4eeed6df0db9cc (patch)
tree6cb3f2990c441968386becdf4d9eab73ff876862 /src/main.cpp
parentMerge pull request #4252 (diff)
downloaddiscoin-7b45d943b29a443f1ac808c9ee4eeed6df0db9cc.tar.xz
discoin-7b45d943b29a443f1ac808c9ee4eeed6df0db9cc.zip
Make max number of orphan blocks kept in memory a startup parameter (fixes #4253)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 18c00d90a..5cb6e706b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1160,7 +1160,7 @@ uint256 static GetOrphanRoot(const uint256& hash)
// Remove a random orphan block (which does not have any dependent orphans).
void static PruneOrphanBlocks()
{
- if (mapOrphanBlocksByPrev.size() <= MAX_ORPHAN_BLOCKS)
+ if (mapOrphanBlocksByPrev.size() <= (size_t)std::max((int64_t)0, GetArg("-maxorphanblocks", DEFAULT_MAX_ORPHAN_BLOCKS)))
return;
// Pick a random orphan block.