Skip to content

Commit

Permalink
disconnecting pre 0.7 nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
backpacker69 committed May 5, 2019
1 parent 9dcb227 commit 7072807
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main.cpp
Expand Up @@ -3875,6 +3875,13 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
else if (strCommand == "verack")
{
pfrom->SetRecvVersion(min(pfrom->nVersion, PROTOCOL_VERSION));

// pre 0.7 nodes are to be disconnected
if (pfrom->nVersion < 70002)
{
printf("version %d is deprecated, disconnecting peer %s\n", pfrom->nVersion, pfrom->addr.ToString().c_str());
pfrom->Misbehaving(100);
}
}


Expand Down

0 comments on commit 7072807

Please sign in to comment.