diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-06-04 19:30:19 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-06-04 19:30:44 +0200 |
commit | f0f4904becbf2514c7cdc53a8942faf3982dda19 (patch) | |
tree | 90a7f60820bcc1322bd0479be94c4cb2a09a580f /src/main.cpp | |
parent | d24310d23aa323dea1c80be52395d6194ac18232 (diff) | |
parent | 7b45d943b29a443f1ac808c9ee4eeed6df0db9cc (diff) |
Merge pull request #4258
7b45d94 Make max number of orphan blocks kept in memory a startup parameter (fixes #4253) (shshshsh)
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 30fa9c6d70..b1258839d0 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. |