changeset 23720:8e0bb7bb88b6

Do not mempool limit a transactions that spends a coinbase Such a transaction should not be prevented on entering the mempool regardless of the fee. Also in included in this commit are some minor changes to passing a reference to a vector rather than a vector for a minor savings.
author Peter Tschipper <peter.tschipper@gmailcom>
date Sat, 05 Mar 2016 20:58:14 -0800
parents 8a79be96660f
children fb30f62e6165
files src/main.cpp src/unlimited.cpp src/unlimited.h
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/main.cpp	Sat Mar 05 11:08:23 2016 -0800
+++ b/src/main.cpp	Sat Mar 05 20:58:14 2016 -0800
@@ -1051,7 +1051,7 @@
         LogPrint("mempool",
                  "MempoolBytes:%d  LimitFreeRelay:%.5g  FeeCutOff:%.4g  FeesSatoshiPerByte:%.4g  TxBytes:%d  TxFees:%d\n",
                   poolBytes, nFreeLimit, ((double)::minRelayTxFee.GetFee(nSize)) / nSize, ((double)nFees) / nSize, nSize, nFees);
-        if (fLimitFree && nFees < ::minRelayTxFee.GetFee(nSize))
+        if (fLimitFree && nFees < ::minRelayTxFee.GetFee(nSize) && !fSpendsCoinbase)
         {
             static double dFreeCount;
 
--- a/src/unlimited.cpp	Sat Mar 05 11:08:23 2016 -0800
+++ b/src/unlimited.cpp	Sat Mar 05 20:58:14 2016 -0800
@@ -521,7 +521,7 @@
     return true;
 }
 
-void BuildSeededBloomFilter(CBloomFilter& filterMemPool, std::vector<uint256> vOrphanHashes)
+void BuildSeededBloomFilter(CBloomFilter& filterMemPool, std::vector<uint256>& vOrphanHashes)
 {
     LogPrint("thin", "Starting creation of bloom filter\n");
     seed_insecure_rand();
--- a/src/unlimited.h	Sat Mar 05 11:08:23 2016 -0800
+++ b/src/unlimited.h	Sat Mar 05 20:58:14 2016 -0800
@@ -71,7 +71,7 @@
 extern void ClearThinblockTimer(uint256 hash);
 extern bool IsThinBlocksEnabled();
 extern bool IsChainNearlySyncd();
-extern void BuildSeededBloomFilter(CBloomFilter& memPoolFilter, std::vector<uint256> vOrphanHashes);
+extern void BuildSeededBloomFilter(CBloomFilter& memPoolFilter, std::vector<uint256>& vOrphanHashes);
 extern void LoadFilter(CNode *pfrom, CBloomFilter *filter);
 extern void HandleBlockMessage(CNode *pfrom, const std::string &strCommand, CBlock &block, const CInv &inv);
 extern void ConnectToThinBlockNodes();