Use larger nPruneAfterSizeIn parameter for mapAlreadyAskedFor (#2882)

unordered_limitedmap was meant to be used with much larger
nPruneAfterSizeIn values to maintain good performance. The way it is not
will result in pruning too often on high load.
This commit is contained in:
Alexander Block 2019-04-25 17:39:18 +02:00 committed by UdjinM6
parent 03021fa53c
commit 2652030a2b

View File

@ -85,7 +85,7 @@ std::map<CNetAddr, LocalServiceInfo> mapLocalHost;
static bool vfLimited[NET_MAX] = {};
std::string strSubVersion;
unordered_limitedmap<uint256, int64_t, StaticSaltedHasher> mapAlreadyAskedFor(MAX_INV_SZ);
unordered_limitedmap<uint256, int64_t, StaticSaltedHasher> mapAlreadyAskedFor(MAX_INV_SZ, MAX_INV_SZ * 2);
// Signals for message handling
static CNodeSignals g_signals;