Merge #42: thisflag should be declared as FlagSpecificData reference

9e4e634 thisflag should be declared as FlagSpecificData reference (Andrea Suisani)
This commit is contained in:
Pieter Wuille 2017-01-12 21:05:23 -08:00
commit d54f39a1ee
No known key found for this signature in database
GPG key ID: DBA1A67379A1A931

View file

@ -217,7 +217,7 @@ public:
nets[NET_IPV6] = true; nets[NET_IPV6] = true;
} }
time_t now = time(NULL); time_t now = time(NULL);
FlagSpecificData thisflag = perflag[requestedFlags]; FlagSpecificData& thisflag = perflag[requestedFlags];
thisflag.cacheHits++; thisflag.cacheHits++;
if (force || thisflag.cacheHits * 400 > (thisflag.cache.size()*thisflag.cache.size()) || (thisflag.cacheHits*thisflag.cacheHits * 20 > thisflag.cache.size() && (now - thisflag.cacheTime > 5))) { if (force || thisflag.cacheHits * 400 > (thisflag.cache.size()*thisflag.cache.size()) || (thisflag.cacheHits*thisflag.cacheHits * 20 > thisflag.cache.size() && (now - thisflag.cacheTime > 5))) {
set<CNetAddr> ips; set<CNetAddr> ips;