Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check New MasterNodeBroadcast Time #722

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/masternode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,18 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos)
//search existing Masternode list, this is where we update existing Masternodes with new mnb broadcasts
CMasternode* pmn = mnodeman.Find(vin);

// no such masternode or it's not enabled yet/already, nothing to update
if(pmn == NULL || (pmn != NULL && !pmn->IsEnabled())) return true;
// no such masternode, nothing to update
if(pmn == NULL) return true ;
else {
// this broadcast older than we have, it's bad.
if(pmn->sigTime > sigTime) {
LogPrintf("mnb - Bad sigTime %d for Masternode %20s %105s (existing broadcast is at %d)\n",
sigTime, addr.ToString(), vin.ToString(), pmn->sigTime);
return false;
}
// masternode is not enabled yet/already, nothing to update
if(!pmn->IsEnabled()) return true;
}

// mn.pubkey = pubkey, IsVinAssociatedWithPubkey is validated once below,
// after that they just need to match
Expand Down