Skip to content

Instantly share code, notes, and snippets.

@tgflynn
Last active October 20, 2016 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tgflynn/47b19dfe844c372aa7a97b0cca453ec4 to your computer and use it in GitHub Desktop.
Save tgflynn/47b19dfe844c372aa7a97b0cca453ec4 to your computer and use it in GitHub Desktop.
CMasternode* pprevMasternode = NULL;
BOOST_FOREACH(CMasternode* pmn, vSortedByAddr) {
if(!pmn->IsEnabled() && !pmn->IsPreEnabled()) continue;
if(!pprevMasternode) {
// Nothing to check on first pass
pprevMasternode = pmn;
continue;
}
if(pmn->addr == pprevMasternode->addr) {
if(!pmn->IsPoSeVerified()) {
// When there are duplicates ban all mn's that don't verify, except the first
vBan.push_back(pmn);
}
}
pprevMasternode = pmn;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment