Merge branch 'v0.12.0.x'
This commit is contained in:
commit
700bf2798f
@ -73,6 +73,7 @@ CMasternode::CMasternode()
|
|||||||
nScanningErrorCount = 0;
|
nScanningErrorCount = 0;
|
||||||
nLastScanningErrorBlockHeight = 0;
|
nLastScanningErrorBlockHeight = 0;
|
||||||
lastTimeChecked = 0;
|
lastTimeChecked = 0;
|
||||||
|
nLastDsee = 0;// temporary, do not save. Remove after migration to v12
|
||||||
nLastDseep = 0;// temporary, do not save. Remove after migration to v12
|
nLastDseep = 0;// temporary, do not save. Remove after migration to v12
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,6 +97,7 @@ CMasternode::CMasternode(const CMasternode& other)
|
|||||||
nScanningErrorCount = other.nScanningErrorCount;
|
nScanningErrorCount = other.nScanningErrorCount;
|
||||||
nLastScanningErrorBlockHeight = other.nLastScanningErrorBlockHeight;
|
nLastScanningErrorBlockHeight = other.nLastScanningErrorBlockHeight;
|
||||||
lastTimeChecked = 0;
|
lastTimeChecked = 0;
|
||||||
|
nLastDsee = other.nLastDsee;// temporary, do not save. Remove after migration to v12
|
||||||
nLastDseep = other.nLastDseep;// temporary, do not save. Remove after migration to v12
|
nLastDseep = other.nLastDseep;// temporary, do not save. Remove after migration to v12
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,6 +121,7 @@ CMasternode::CMasternode(const CMasternodeBroadcast& mnb)
|
|||||||
nScanningErrorCount = 0;
|
nScanningErrorCount = 0;
|
||||||
nLastScanningErrorBlockHeight = 0;
|
nLastScanningErrorBlockHeight = 0;
|
||||||
lastTimeChecked = 0;
|
lastTimeChecked = 0;
|
||||||
|
nLastDsee = 0;// temporary, do not save. Remove after migration to v12
|
||||||
nLastDseep = 0;// temporary, do not save. Remove after migration to v12
|
nLastDseep = 0;// temporary, do not save. Remove after migration to v12
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,6 +135,7 @@ public:
|
|||||||
int nLastScanningErrorBlockHeight;
|
int nLastScanningErrorBlockHeight;
|
||||||
CMasternodePing lastPing;
|
CMasternodePing lastPing;
|
||||||
|
|
||||||
|
int64_t nLastDsee;// temporary, do not save. Remove after migration to v12
|
||||||
int64_t nLastDseep;// temporary, do not save. Remove after migration to v12
|
int64_t nLastDseep;// temporary, do not save. Remove after migration to v12
|
||||||
|
|
||||||
CMasternode();
|
CMasternode();
|
||||||
|
@ -860,9 +860,9 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
|
|||||||
// e.g. We don't want the entry relayed/time updated when we're syncing the list
|
// e.g. We don't want the entry relayed/time updated when we're syncing the list
|
||||||
// mn.pubkey = pubkey, IsVinAssociatedWithPubkey is validated once below,
|
// mn.pubkey = pubkey, IsVinAssociatedWithPubkey is validated once below,
|
||||||
// after that they just need to match
|
// after that they just need to match
|
||||||
if(count == -1 && pmn->pubkey == pubkey && (GetAdjustedTime() - pmn->sigTime > MASTERNODE_MIN_MNB_SECONDS)){
|
if(count == -1 && pmn->pubkey == pubkey && (GetAdjustedTime() - pmn->nLastDsee > MASTERNODE_MIN_MNB_SECONDS)){
|
||||||
if(pmn->protocolVersion > GETHEADERS_VERSION && sigTime - pmn->lastPing.sigTime < MASTERNODE_MIN_MNB_SECONDS) return;
|
if(pmn->protocolVersion > GETHEADERS_VERSION && sigTime - pmn->lastPing.sigTime < MASTERNODE_MIN_MNB_SECONDS) return;
|
||||||
if(pmn->sigTime < sigTime){ //take the newest entry
|
if(pmn->nLastDsee < sigTime){ //take the newest entry
|
||||||
LogPrintf("dsee - Got updated entry for %s\n", addr.ToString().c_str());
|
LogPrintf("dsee - Got updated entry for %s\n", addr.ToString().c_str());
|
||||||
if(pmn->protocolVersion < GETHEADERS_VERSION) {
|
if(pmn->protocolVersion < GETHEADERS_VERSION) {
|
||||||
pmn->pubkey2 = pubkey2;
|
pmn->pubkey2 = pubkey2;
|
||||||
@ -873,6 +873,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
|
|||||||
//fake ping
|
//fake ping
|
||||||
pmn->lastPing = CMasternodePing(vin);
|
pmn->lastPing = CMasternodePing(vin);
|
||||||
}
|
}
|
||||||
|
pmn->nLastDsee = sigTime;
|
||||||
pmn->Check();
|
pmn->Check();
|
||||||
if(pmn->IsEnabled()) {
|
if(pmn->IsEnabled()) {
|
||||||
TRY_LOCK(cs_vNodes, lockNodes);
|
TRY_LOCK(cs_vNodes, lockNodes);
|
||||||
|
@ -769,14 +769,18 @@ void BitcoinGUI::setNumBlocks(int count)
|
|||||||
":/movies/spinner-%1").arg(spinnerFrame, 3, 10, QChar('0')))
|
":/movies/spinner-%1").arg(spinnerFrame, 3, 10, QChar('0')))
|
||||||
.pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
|
.pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
|
||||||
spinnerFrame = (spinnerFrame + 1) % SPINNER_FRAMES;
|
spinnerFrame = (spinnerFrame + 1) % SPINNER_FRAMES;
|
||||||
|
progressBar->setMaximum(4 * MASTERNODE_SYNC_THRESHOLD);
|
||||||
prevAttempt = masternodeSync.RequestedMasternodeAttempt + 1;
|
prevAttempt = masternodeSync.RequestedMasternodeAttempt + 1;
|
||||||
prevAssets = masternodeSync.RequestedMasternodeAssets;
|
prevAssets = masternodeSync.RequestedMasternodeAssets;
|
||||||
if(prevAttempt <= MASTERNODE_SYNC_THRESHOLD) progress = prevAttempt + (prevAssets - 1) * MASTERNODE_SYNC_THRESHOLD;
|
if(prevAttempt <= MASTERNODE_SYNC_THRESHOLD) progress = prevAttempt + (prevAssets - 1) * MASTERNODE_SYNC_THRESHOLD;
|
||||||
progressBar->setValue(progress);
|
progressBar->setValue(progress);
|
||||||
|
#ifdef ENABLE_WALLET
|
||||||
|
if(walletFrame)
|
||||||
|
walletFrame->showOutOfSyncWarning(false);
|
||||||
|
#endif // ENABLE_WALLET
|
||||||
}
|
}
|
||||||
switch (masternodeSync.RequestedMasternodeAssets) {
|
switch (masternodeSync.RequestedMasternodeAssets) {
|
||||||
case MASTERNODE_SYNC_SPORKS:
|
case MASTERNODE_SYNC_SPORKS:
|
||||||
progressBar->setMaximum(4 * MASTERNODE_SYNC_THRESHOLD);
|
|
||||||
progressBarLabel->setText(tr("Synchronizing sporks..."));
|
progressBarLabel->setText(tr("Synchronizing sporks..."));
|
||||||
break;
|
break;
|
||||||
case MASTERNODE_SYNC_LIST:
|
case MASTERNODE_SYNC_LIST:
|
||||||
@ -789,10 +793,6 @@ void BitcoinGUI::setNumBlocks(int count)
|
|||||||
progressBarLabel->setText(tr("Synchronizing budgets..."));
|
progressBarLabel->setText(tr("Synchronizing budgets..."));
|
||||||
break;
|
break;
|
||||||
case MASTERNODE_SYNC_FINISHED:
|
case MASTERNODE_SYNC_FINISHED:
|
||||||
#ifdef ENABLE_WALLET
|
|
||||||
if(walletFrame)
|
|
||||||
walletFrame->showOutOfSyncWarning(false);
|
|
||||||
#endif // ENABLE_WALLET
|
|
||||||
progressBarLabel->setVisible(false);
|
progressBarLabel->setVisible(false);
|
||||||
progressBar->setVisible(false);
|
progressBar->setVisible(false);
|
||||||
labelBlocksIcon->setPixmap(QIcon(":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
|
labelBlocksIcon->setPixmap(QIcon(":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
|
||||||
|
Loading…
Reference in New Issue
Block a user