backports-0.15-pr6 code review
This commit is contained in:
parent
1be5a72a97
commit
bb90eb4bf0
@ -221,7 +221,8 @@ class AcceptBlockTest(BitcoinTestFramework):
|
|||||||
headers_message.headers.append(CBlockHeader(next_block))
|
headers_message.headers.append(CBlockHeader(next_block))
|
||||||
tips[j] = next_block
|
tips[j] = next_block
|
||||||
|
|
||||||
time.sleep(2)
|
set_mocktime(get_mocktime() + 2)
|
||||||
|
set_node_times(self.nodes, get_mocktime())
|
||||||
# Blocks 1-287 should be accepted, block 288 should be ignored because it's too far ahead
|
# Blocks 1-287 should be accepted, block 288 should be ignored because it's too far ahead
|
||||||
for x in all_blocks[:-1]:
|
for x in all_blocks[:-1]:
|
||||||
self.nodes[0].getblock(x.hash)
|
self.nodes[0].getblock(x.hash)
|
||||||
|
14
src/init.cpp
14
src/init.cpp
@ -2032,19 +2032,19 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||||||
// ********************************************************* Step 11c: schedule Dash-specific tasks
|
// ********************************************************* Step 11c: schedule Dash-specific tasks
|
||||||
|
|
||||||
if (!fLiteMode) {
|
if (!fLiteMode) {
|
||||||
scheduler.scheduleEvery(boost::bind(&CNetFulfilledRequestManager::DoMaintenance, boost::ref(netfulfilledman)), 60);
|
scheduler.scheduleEvery(boost::bind(&CNetFulfilledRequestManager::DoMaintenance, boost::ref(netfulfilledman)), 60 * 1000);
|
||||||
scheduler.scheduleEvery(boost::bind(&CMasternodeSync::DoMaintenance, boost::ref(masternodeSync), boost::ref(*g_connman)), 1);
|
scheduler.scheduleEvery(boost::bind(&CMasternodeSync::DoMaintenance, boost::ref(masternodeSync), boost::ref(*g_connman)), 1 * 1000);
|
||||||
scheduler.scheduleEvery(boost::bind(&CMasternodeUtils::DoMaintenance, boost::ref(*g_connman)), 1);
|
scheduler.scheduleEvery(boost::bind(&CMasternodeUtils::DoMaintenance, boost::ref(*g_connman)), 1 * 1000);
|
||||||
|
|
||||||
scheduler.scheduleEvery(boost::bind(&CGovernanceManager::DoMaintenance, boost::ref(governance), boost::ref(*g_connman)), 60 * 5);
|
scheduler.scheduleEvery(boost::bind(&CGovernanceManager::DoMaintenance, boost::ref(governance), boost::ref(*g_connman)), 60 * 5 * 1000);
|
||||||
|
|
||||||
scheduler.scheduleEvery(boost::bind(&CInstantSend::DoMaintenance, boost::ref(instantsend)), 60);
|
scheduler.scheduleEvery(boost::bind(&CInstantSend::DoMaintenance, boost::ref(instantsend)), 60 * 1000);
|
||||||
|
|
||||||
if (fMasternodeMode)
|
if (fMasternodeMode)
|
||||||
scheduler.scheduleEvery(boost::bind(&CPrivateSendServer::DoMaintenance, boost::ref(privateSendServer), boost::ref(*g_connman)), 1);
|
scheduler.scheduleEvery(boost::bind(&CPrivateSendServer::DoMaintenance, boost::ref(privateSendServer), boost::ref(*g_connman)), 1 * 1000);
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
else
|
else
|
||||||
scheduler.scheduleEvery(boost::bind(&CPrivateSendClientManager::DoMaintenance, boost::ref(privateSendClient), boost::ref(*g_connman)), 1);
|
scheduler.scheduleEvery(boost::bind(&CPrivateSendClientManager::DoMaintenance, boost::ref(privateSendClient), boost::ref(*g_connman)), 1 * 1000);
|
||||||
#endif // ENABLE_WALLET
|
#endif // ENABLE_WALLET
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ CDKGDebugManager::CDKGDebugManager(CScheduler* _scheduler) :
|
|||||||
if (scheduler) {
|
if (scheduler) {
|
||||||
scheduler->scheduleEvery([&]() {
|
scheduler->scheduleEvery([&]() {
|
||||||
SendLocalStatus();
|
SendLocalStatus();
|
||||||
}, 10);
|
}, 10 * 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1580,13 +1580,6 @@ CFeeRate CTxMemPool::GetMinFee(size_t sizelimit) const {
|
|||||||
return std::max(CFeeRate(rollingMinimumFeeRate), incrementalRelayFee);
|
return std::max(CFeeRate(rollingMinimumFeeRate), incrementalRelayFee);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CTxMemPool::UpdateMinFee(const CFeeRate& _minReasonableRelayFee)
|
|
||||||
{
|
|
||||||
LOCK(cs);
|
|
||||||
delete minerPolicyEstimator;
|
|
||||||
minerPolicyEstimator = new CBlockPolicyEstimator(_minReasonableRelayFee);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CTxMemPool::trackPackageRemoved(const CFeeRate& rate) {
|
void CTxMemPool::trackPackageRemoved(const CFeeRate& rate) {
|
||||||
AssertLockHeld(cs);
|
AssertLockHeld(cs);
|
||||||
if (rate.GetFeePerK() > rollingMinimumFeeRate) {
|
if (rate.GetFeePerK() > rollingMinimumFeeRate) {
|
||||||
|
@ -656,7 +656,6 @@ public:
|
|||||||
* would otherwise be half of this, it is set to 0 instead.
|
* would otherwise be half of this, it is set to 0 instead.
|
||||||
*/
|
*/
|
||||||
CFeeRate GetMinFee(size_t sizelimit) const;
|
CFeeRate GetMinFee(size_t sizelimit) const;
|
||||||
void UpdateMinFee(const CFeeRate& _minReasonableRelayFee);
|
|
||||||
|
|
||||||
/** Remove transactions from the mempool until its dynamic size is <= sizelimit.
|
/** Remove transactions from the mempool until its dynamic size is <= sizelimit.
|
||||||
* pvNoSpendsRemaining, if set, will be populated with the list of outpoints
|
* pvNoSpendsRemaining, if set, will be populated with the list of outpoints
|
||||||
|
@ -864,7 +864,7 @@ bool CWalletDB::RecoverKeysOnlyFilter(void *callbackData, CDataStream ssKey, CDa
|
|||||||
fReadOK = ReadKeyValue(dummyWallet, ssKey, ssValue,
|
fReadOK = ReadKeyValue(dummyWallet, ssKey, ssValue,
|
||||||
dummyWss, strType, strErr);
|
dummyWss, strType, strErr);
|
||||||
}
|
}
|
||||||
if (!IsKeyType(strType) && strType != "hdchain")
|
if (!IsKeyType(strType) && strType != "hdpubkey")
|
||||||
return false;
|
return false;
|
||||||
if (!fReadOK)
|
if (!fReadOK)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user