Skip to content

Commit bb90eb4

Browse files
backports-0.15-pr6 code review
1 parent 1be5a72 commit bb90eb4

File tree

6 files changed

+11
-18
lines changed

6 files changed

+11
-18
lines changed

qa/rpc-tests/p2p-acceptblock.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ def run_test(self):
221221
headers_message.headers.append(CBlockHeader(next_block))
222222
tips[j] = next_block
223223

224-
time.sleep(2)
224+
set_mocktime(get_mocktime() + 2)
225+
set_node_times(self.nodes, get_mocktime())
225226
# Blocks 1-287 should be accepted, block 288 should be ignored because it's too far ahead
226227
for x in all_blocks[:-1]:
227228
self.nodes[0].getblock(x.hash)

src/init.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -2032,19 +2032,19 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
20322032
// ********************************************************* Step 11c: schedule Dash-specific tasks
20332033

20342034
if (!fLiteMode) {
2035-
scheduler.scheduleEvery(boost::bind(&CNetFulfilledRequestManager::DoMaintenance, boost::ref(netfulfilledman)), 60);
2036-
scheduler.scheduleEvery(boost::bind(&CMasternodeSync::DoMaintenance, boost::ref(masternodeSync), boost::ref(*g_connman)), 1);
2037-
scheduler.scheduleEvery(boost::bind(&CMasternodeUtils::DoMaintenance, boost::ref(*g_connman)), 1);
2035+
scheduler.scheduleEvery(boost::bind(&CNetFulfilledRequestManager::DoMaintenance, boost::ref(netfulfilledman)), 60 * 1000);
2036+
scheduler.scheduleEvery(boost::bind(&CMasternodeSync::DoMaintenance, boost::ref(masternodeSync), boost::ref(*g_connman)), 1 * 1000);
2037+
scheduler.scheduleEvery(boost::bind(&CMasternodeUtils::DoMaintenance, boost::ref(*g_connman)), 1 * 1000);
20382038

2039-
scheduler.scheduleEvery(boost::bind(&CGovernanceManager::DoMaintenance, boost::ref(governance), boost::ref(*g_connman)), 60 * 5);
2039+
scheduler.scheduleEvery(boost::bind(&CGovernanceManager::DoMaintenance, boost::ref(governance), boost::ref(*g_connman)), 60 * 5 * 1000);
20402040

2041-
scheduler.scheduleEvery(boost::bind(&CInstantSend::DoMaintenance, boost::ref(instantsend)), 60);
2041+
scheduler.scheduleEvery(boost::bind(&CInstantSend::DoMaintenance, boost::ref(instantsend)), 60 * 1000);
20422042

20432043
if (fMasternodeMode)
2044-
scheduler.scheduleEvery(boost::bind(&CPrivateSendServer::DoMaintenance, boost::ref(privateSendServer), boost::ref(*g_connman)), 1);
2044+
scheduler.scheduleEvery(boost::bind(&CPrivateSendServer::DoMaintenance, boost::ref(privateSendServer), boost::ref(*g_connman)), 1 * 1000);
20452045
#ifdef ENABLE_WALLET
20462046
else
2047-
scheduler.scheduleEvery(boost::bind(&CPrivateSendClientManager::DoMaintenance, boost::ref(privateSendClient), boost::ref(*g_connman)), 1);
2047+
scheduler.scheduleEvery(boost::bind(&CPrivateSendClientManager::DoMaintenance, boost::ref(privateSendClient), boost::ref(*g_connman)), 1 * 1000);
20482048
#endif // ENABLE_WALLET
20492049
}
20502050

src/llmq/quorums_debug.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ CDKGDebugManager::CDKGDebugManager(CScheduler* _scheduler) :
114114
if (scheduler) {
115115
scheduler->scheduleEvery([&]() {
116116
SendLocalStatus();
117-
}, 10);
117+
}, 10 * 1000);
118118
}
119119
}
120120

src/txmempool.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -1580,13 +1580,6 @@ CFeeRate CTxMemPool::GetMinFee(size_t sizelimit) const {
15801580
return std::max(CFeeRate(rollingMinimumFeeRate), incrementalRelayFee);
15811581
}
15821582

1583-
void CTxMemPool::UpdateMinFee(const CFeeRate& _minReasonableRelayFee)
1584-
{
1585-
LOCK(cs);
1586-
delete minerPolicyEstimator;
1587-
minerPolicyEstimator = new CBlockPolicyEstimator(_minReasonableRelayFee);
1588-
}
1589-
15901583
void CTxMemPool::trackPackageRemoved(const CFeeRate& rate) {
15911584
AssertLockHeld(cs);
15921585
if (rate.GetFeePerK() > rollingMinimumFeeRate) {

src/txmempool.h

-1
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,6 @@ class CTxMemPool
656656
* would otherwise be half of this, it is set to 0 instead.
657657
*/
658658
CFeeRate GetMinFee(size_t sizelimit) const;
659-
void UpdateMinFee(const CFeeRate& _minReasonableRelayFee);
660659

661660
/** Remove transactions from the mempool until its dynamic size is <= sizelimit.
662661
* pvNoSpendsRemaining, if set, will be populated with the list of outpoints

src/wallet/walletdb.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ bool CWalletDB::RecoverKeysOnlyFilter(void *callbackData, CDataStream ssKey, CDa
864864
fReadOK = ReadKeyValue(dummyWallet, ssKey, ssValue,
865865
dummyWss, strType, strErr);
866866
}
867-
if (!IsKeyType(strType) && strType != "hdchain")
867+
if (!IsKeyType(strType) && strType != "hdpubkey")
868868
return false;
869869
if (!fReadOK)
870870
{

0 commit comments

Comments
 (0)