Skip to content

Commit

Permalink
Additl protocol enforcement at collateral change block
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptoDragonLady committed Mar 5, 2019
1 parent 702a9ec commit fd11a67
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/spork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@ void ProcessSpork(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)

//does a task if needed
ExecuteSpork(spork.nSporkID, spork.nValue);
if (chainActive.Tip()->nHeight >= 440000) {
if (spork.nSporkID == 10017 && GetSporkValue(SPORK_18_KILL_STRAGGLERS) > 0) {
LOCK(cs_vNodes);
BOOST_FOREACH (CNode* pnode, vNodes) {
if (pnode->nVersion != MIN_PEER_PROTO_VERSION_AFTER_ENFORCEMENT) {
CNode::Ban(pnode->addr);
pnode->CloseSocketDisconnect();
LogPrintf("Dropped and banned peer %s (%s) for not updating\n", pnode->GetId(),pnode->addr.ToString());
}
}
}
}
}
if (strCommand == "getsporks") {
std::map<int, CSporkMessage>::iterator it = mapSporksActive.begin();
Expand Down

0 comments on commit fd11a67

Please sign in to comment.