summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomZ2017-07-31 12:38:26 +0200
committerTomZ2017-07-31 12:38:26 +0200
commit302a07dc2836d3ece70253f7e184575d67ae6e77 (patch)
treeb091f172ff39bae76d0d43e1b212d4e9cd4438d2
parentc0efffc2e6f42e982e72fbfb41db48462e44675a (diff)
downloadaur-302a07dc2836d3ece70253f7e184575d67ae6e77.tar.gz
Update to 1.3.1
Also had to fetch some post-131 commits to make the unit tests pass.
-rw-r--r--patch13161
1 files changed, 61 insertions, 0 deletions
diff --git a/patch131 b/patch131
new file mode 100644
index 000000000000..21067db0b11c
--- /dev/null
+++ b/patch131
@@ -0,0 +1,61 @@
+diff --git a/src/Logger.cpp b/src/Logger.cpp
+index 3083b2ee1..801ca0681 100644
+--- a/src/Logger.cpp
++++ b/src/Logger.cpp
+@@ -122,7 +122,9 @@ short Log::Manager::section(const char *category)
+ return Log::Global;
+ auto iter = d->categoryMapping.find(category);
+ assert (iter != d->categoryMapping.end());
+- return iter->second;
++ if (iter == d->categoryMapping.end())
++ return iter->second;
++ return Log::Global;
+ }
+
+ Log::Manager *Log::Manager::instance()
+diff --git a/src/addrman.cpp b/src/addrman.cpp
+index 20a1efbc2..12948660d 100644
+--- a/src/addrman.cpp
++++ b/src/addrman.cpp
+@@ -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;
+diff --git a/src/addrman.h b/src/addrman.h
+index 749bdf1a9..9469fcd57 100644
+--- a/src/addrman.h
++++ b/src/addrman.h
+@@ -75,6 +75,7 @@ public:
+ nRefCount = 0;
+ fInTried = false;
+ fKnowsXThin = false;
++ fKnowsCash = false;
+ nRandomPos = -1;
+ }
+
+@@ -439,6 +440,7 @@ public:
+ 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);
+ }
+diff --git a/src/main.cpp b/src/main.cpp
+index 2cf51ee4b..1af19ddb5 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -3181,7 +3181,7 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIn
+ // this is a UAHF-chain block!
+ logInfo(8002) << "Check block found an UAHF chain block (based on timestamp)" << pindexPrev->nHeight + 1 << block.GetHash();
+
+- if (pindexPrev->pprev->GetMedianTimePast() < startTime) {
++ if (pindexPrev->pprev && pindexPrev->pprev->GetMedianTimePast() < startTime) {
+ logInfo(8002) << " + block is the anti-rollback block!" << pindexPrev->nHeight + 1 << "size:" << blockSize;
+ // If UAHF is enabled for the curent block, but not for the previous
+ // block, we must check that the block is larger than 1MB.