File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -398,8 +398,18 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos)
398398 // search existing Masternode list, this is where we update existing Masternodes with new mnb broadcasts
399399 CMasternode* pmn = mnodeman.Find (vin);
400400
401- // no such masternode or it's not enabled already, nothing to update
402- if (pmn == NULL || (pmn != NULL && !pmn->IsEnabled ())) return true ;
401+ // no such masternode, nothing to update
402+ if (pmn == NULL ) return true ;
403+ else {
404+ // this broadcast older than we have, it's bad.
405+ if (pmn->sigTime > sigTime) {
406+ LogPrintf (" mnb - Bad sigTime %d for Masternode %20s %105s (existing broadcast is at %d)\n " ,
407+ sigTime, addr.ToString (), vin.ToString (), pmn->sigTime );
408+ return false ;
409+ }
410+ // masternode is not enabled yet/already, nothing to update
411+ if (!pmn->IsEnabled ()) return true ;
412+ }
403413
404414 // mn.pubkey = pubkey, IsVinAssociatedWithPubkey is validated once below,
405415 // after that they just need to match
You can’t perform that action at this time.
0 commit comments