From fd11a67dce6b3e2e1169dc3a0375b960e4140630 Mon Sep 17 00:00:00 2001 From: CryptoDragonLady Date: Tue, 5 Mar 2019 00:21:45 -0700 Subject: [PATCH] Additl protocol enforcement at collateral change block --- src/spork.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/spork.cpp b/src/spork.cpp index 85ee217..885685c 100644 --- a/src/spork.cpp +++ b/src/spork.cpp @@ -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::iterator it = mapSporksActive.begin();