diff --git a/qa/rpc-tests/smartfees.py b/qa/rpc-tests/smartfees.py index 0c07ef8a53..5629ca7369 100755 --- a/qa/rpc-tests/smartfees.py +++ b/qa/rpc-tests/smartfees.py @@ -40,7 +40,7 @@ class EstimateFeeTest(BitcoinTestFramework): def run_test(self): # Prime the memory pool with pairs of transactions # (high-priority, random fee and zero-priority, random fee) - min_fee = Decimal("0.001") + min_fee = Decimal("0.00010000") fees_per_kb = []; for i in range(12): (txid, txhex, fee) = random_zeropri_transaction(self.nodes, Decimal("1.1"), @@ -58,7 +58,7 @@ class EstimateFeeTest(BitcoinTestFramework): print("Fee estimates, super-stingy miner: "+str([str(e) for e in all_estimates])) # Estimates should be within the bounds of what transactions fees actually were: - delta = 1.0e-6 # account for rounding error + delta = 1.0e-5 # account for rounding error for e in filter(lambda x: x >= 0, all_estimates): if float(e)+delta < min(fees_per_kb) or float(e)-delta > max(fees_per_kb): raise AssertionError("Estimated fee (%f) out of range (%f,%f)"%(float(e), min_fee_kb, max_fee_kb)) diff --git a/src/main.cpp b/src/main.cpp index a55fd367aa..c3fb150b36 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1539,7 +1539,7 @@ int64_t GetBlockValue(int nBits, int nHeight, const CAmount& nFees) double dDiff = (double)0x0000ffff / (double)(nBits & 0x00ffffff); /* fixed bug caused diff to not be correctly calculated */ - if(nHeight > 4500 || Params().NetworkID() == CBaseChainParams::TESTNET) dDiff = ConvertBitsToDouble(nBits); + if(nHeight > 4500 || Params().NetworkID() != CBaseChainParams::MAIN) dDiff = ConvertBitsToDouble(nBits); int64_t nSubsidy = 0; if(nHeight >= 5465) { diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp index f38f85f2e9..f9c418d31a 100644 --- a/src/masternodeman.cpp +++ b/src/masternodeman.cpp @@ -324,17 +324,18 @@ void CMasternodeMan::CheckAndRemove(bool forceExpiredRemoval) } } - // remove expired mapSeenMasternodeBroadcast - map::iterator it3 = mapSeenMasternodeBroadcast.begin(); - while(it3 != mapSeenMasternodeBroadcast.end()){ - if((*it3).second.lastPing.sigTime < GetTime()-(MASTERNODE_REMOVAL_SECONDS*2)){ - mapSeenMasternodeBroadcast.erase(it3++); - masternodeSync.mapSeenSyncMNB.erase((*it3).second.GetHash()); - } else { - ++it3; - } - } - + // remove expired mapSeenMasternodeBroadcast + map::iterator it3 = mapSeenMasternodeBroadcast.begin(); + while(it3 != mapSeenMasternodeBroadcast.end()){ + if((*it3).second.lastPing.sigTime < GetTime() - MASTERNODE_REMOVAL_SECONDS*2){ + LogPrint("masternode", "CMasternodeMan::CheckAndRemove - Removing expired Masternode broadcast %s\n", (*it3).second.GetHash().ToString()); + masternodeSync.mapSeenSyncMNB.erase((*it3).second.GetHash()); + mapSeenMasternodeBroadcast.erase(it3++); + } else { + ++it3; + } + } + // remove expired mapSeenMasternodePing map::iterator it4 = mapSeenMasternodePing.begin(); while(it4 != mapSeenMasternodePing.end()){ diff --git a/src/txmempool.h b/src/txmempool.h index bb6f7443d5..d5a4955f38 100644 --- a/src/txmempool.h +++ b/src/txmempool.h @@ -17,7 +17,7 @@ class CAutoFile; inline double AllowFreeThreshold() { - return COIN * 576 / 250; + return COIN * 144 / 250; } inline bool AllowFree(double dPriority)