Permalink
Browse files

Remember the xthin and cash nodes between runs.

  • Loading branch information...
zander committed Jul 31, 2017
1 parent 13c635c commit d7ca53ca8bab32b6366dca898ead47865fcff8db
Showing with 3 additions and 1 deletion.
  1. +1 −1 src/addrman.cpp
  2. +2 −0 src/addrman.h
View
@@ -90,7 +90,7 @@ double CAddrInfo::GetChance(int64_t nNow) const
// deprioritize 66% after each failed attempt, but at most 1/28th to avoid the search taking forever or overly penalizing outages.
fChance *= pow(0.66, std::min(nAttempts, 8));
if (fKnowsXThin)
if (fKnowsXThin | fKnowsCash)
fChance *= 1.5;
return fChance;
View
@@ -75,6 +75,7 @@ class CAddrInfo : public CAddress
nRefCount = 0;
fInTried = false;
fKnowsXThin = false;
fKnowsCash = false;
nRandomPos = -1;
}
@@ -439,6 +440,7 @@ class CAddrMan
auto info = mapInfo.find(index);
if (info != mapInfo.end()) {
info->second.setKnowsXThin(true);
info->second.setKnowsCash(true);
} else {
LogPrintf("CAddMan: Warning, loading priority address out of range; %d\n", index);
}

0 comments on commit d7ca53c

Please sign in to comment.