aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorshshshsh <[email protected]>2014-05-30 12:35:23 +0000
committermichilumin <[email protected]>2014-09-27 20:03:01 -0600
commit5cda7594f0a9cc2f343061128483f50810368cbd (patch)
treea91617ebd6191c11b0e496767c10cc52b2217e15 /src/main.cpp
parentStore fewer orphan tx by default, add -maxorphantx option (diff)
downloaddiscoin-5cda7594f0a9cc2f343061128483f50810368cbd.tar.xz
discoin-5cda7594f0a9cc2f343061128483f50810368cbd.zip
Make max number of orphan blocks kept in memory a startup parameter (fixes #4253)
Rebased-From: 7b45d943b29a443f1ac808c9ee4eeed6df0db9cc Conflicts: src/init.cpp src/main.h
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 b9ca00d71..db9d4bf45 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1181,7 +1181,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.