diff --git a/qa/rpc-tests/smartfees.py b/qa/rpc-tests/smartfees.py index 0c07ef8a53d8a..5629ca7369556 100755 --- a/qa/rpc-tests/smartfees.py +++ b/qa/rpc-tests/smartfees.py @@ -40,7 +40,7 @@ def setup_network(self): 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 @@ def run_test(self): 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/qa/rpc-tests/test_framework.py b/qa/rpc-tests/test_framework.py index 4c8a11b821d4a..0205b08121856 100755 --- a/qa/rpc-tests/test_framework.py +++ b/qa/rpc-tests/test_framework.py @@ -24,7 +24,7 @@ class BitcoinTestFramework(object): def run_test(self): for node in self.nodes: assert_equal(node.getblockcount(), 200) - assert_equal(node.getbalance(), 25*50) + assert_equal(node.getbalance(), 25*500) def add_options(self, parser): pass diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py index d40e3b1f78fa9..09a7da678bcd4 100644 --- a/qa/rpc-tests/util.py +++ b/qa/rpc-tests/util.py @@ -104,14 +104,14 @@ def initialize_chain(test_dir): # Create a 200-block-long chain; each of the 4 nodes # gets 25 mature blocks and 25 immature. # blocks are created with timestamps 10 minutes apart, starting - # at 1 Jan 2014 - block_time = 1388534400 + # at 2014-12-04T17:15:37+00:00 in ISO 8601 + block_time = 1417713337 for i in range(2): for peer in range(4): for j in range(25): set_node_times(rpcs, block_time) rpcs[peer].setgenerate(True, 1) - block_time += 10*60 + block_time += 150 # Must sync before next peer starts generating blocks sync_blocks(rpcs) diff --git a/src/main.cpp b/src/main.cpp index a55fd367aa6e8..c3fb150b36ea0 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 429df7d002b5b..98e1fecdf7607 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 bb6f7443d562a..d5a4955f38879 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)