Skip to content

Commit

Permalink
Ban old versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Hser2bio committed Apr 10, 2021
1 parent 6dfa4cf commit 55ff8a2
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2120,14 +2120,18 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr
cleanSubVer = SanitizeString(strSubVer);
}

// disconnect from old versions
if (cleanSubVer != "/LQX Core:0.16.0.5/") {
LogPrintf("%s - Disconnecting from obselete version (peer: %d)\n", __func__, pfrom->GetId());
Misbehaving(pfrom->GetId(), 100);
pfrom->fDisconnect = true;
// Banned old versions
if (cleanSubVer == "/LQX Core:0.16.0.1/" ||
cleanSubVer == "/LQX Core:0.16.0.2/" ||
cleanSubVer == "/LQX Core:0.16.0.3/" ||
cleanSubVer == "/LQX Core:0.16.0.4/") {
LOCK(cs_main);
LogPrintf("%s - Disconnecting from old version (peer: %d)\n", __func__, pfrom->GetId());
Misbehaving(pfrom->GetId(), 100); // instantly ban
pfrom->fDisconnect = true;
return true;
}
}

if (!vRecv.empty()) {
vRecv >> nStartingHeight;
}
Expand Down

0 comments on commit 55ff8a2

Please sign in to comment.