Skip to content

Commit

Permalink
Use larger nPruneAfterSizeIn parameter for mapAlreadyAskedFor (#2882)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
codablock authored and UdjinM6 committed Apr 25, 2019
1 parent 03021fa commit 2652030
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2652030

Please sign in to comment.