diff options
author | shshshsh <shshshsh@sdsdsdfsd.invalid> | 2014-05-30 12:35:23 +0000 |
---|---|---|
committer | shshshsh <shshshsh@sdsdsdfsd.invalid> | 2014-06-04 11:58:18 +0000 |
commit | 7b45d943b29a443f1ac808c9ee4eeed6df0db9cc (patch) | |
tree | 6cb3f2990c441968386becdf4d9eab73ff876862 /src/main.cpp | |
parent | 97ab93f50b6f35bc362990e9dd665b90ca4132df (diff) |
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.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 18c00d90ac..5cb6e706bb 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. |