mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
Merge pull request #4258
7b45d94 Make max number of orphan blocks kept in memory a startup parameter (fixes #4253) (shshshsh)
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user