diff --git a/src/net_processing.cpp b/src/net_processing.cpp index b304da76c..f458a3525 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1420,6 +1420,13 @@ bool static ProcessMessage(CNode* pfrom, const std::string& strCommand, CDataStr pfrom->fSuccessfullyConnected = true; } + else if (!pfrom->fSuccessfullyConnected) + { + // Must have a verack message before anything else + LOCK(cs_main); + Misbehaving(pfrom->GetId(), 1); + return false; + } else if (strCommand == NetMsgType::ADDR) {