fix: update DIP0001 related stuff even in IBD (#1652)

This commit is contained in:
UdjinM6 2017-09-22 04:54:14 +03:00 committed by GitHub
parent 7efa5e79d7
commit d07ac4fbd3

View File

@ -34,15 +34,6 @@ void CDSNotificationInterface::UpdatedBlockTip(const CBlockIndex *pindexNew, con
masternodeSync.UpdatedBlockTip(pindexNew, fInitialDownload, connman); masternodeSync.UpdatedBlockTip(pindexNew, fInitialDownload, connman);
if (fInitialDownload) // In IBD
return;
mnodeman.UpdatedBlockTip(pindexNew);
privateSendClient.UpdatedBlockTip(pindexNew);
instantsend.UpdatedBlockTip(pindexNew);
mnpayments.UpdatedBlockTip(pindexNew, connman);
governance.UpdatedBlockTip(pindexNew, connman);
// DIP0001 updates // DIP0001 updates
bool fDIP0001ActiveAtTipTmp = fDIP0001ActiveAtTip; bool fDIP0001ActiveAtTipTmp = fDIP0001ActiveAtTip;
@ -63,6 +54,15 @@ void CDSNotificationInterface::UpdatedBlockTip(const CBlockIndex *pindexNew, con
CWallet::fallbackFee = CFeeRate(fDIP0001ActiveAtTip ? DEFAULT_DIP0001_FALLBACK_FEE : DEFAULT_LEGACY_FALLBACK_FEE); CWallet::fallbackFee = CFeeRate(fDIP0001ActiveAtTip ? DEFAULT_DIP0001_FALLBACK_FEE : DEFAULT_LEGACY_FALLBACK_FEE);
} }
} }
if (fInitialDownload || !masternodeSync.IsBlockchainSynced())
return;
mnodeman.UpdatedBlockTip(pindexNew);
privateSendClient.UpdatedBlockTip(pindexNew);
instantsend.UpdatedBlockTip(pindexNew);
mnpayments.UpdatedBlockTip(pindexNew, connman);
governance.UpdatedBlockTip(pindexNew, connman);
} }
void CDSNotificationInterface::SyncTransaction(const CTransaction &tx, const CBlock *pblock) void CDSNotificationInterface::SyncTransaction(const CTransaction &tx, const CBlock *pblock)