From 20a5f610d344dfc1dc0c6e5e9e4b0211370aa563 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 29 Oct 2014 16:03:09 +0100 Subject: Don't relay alerts to peers before version negotiation Fixes #1436 --- src/alert.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/alert.cpp b/src/alert.cpp index d495849206..b6d3804792 100644 --- a/src/alert.cpp +++ b/src/alert.cpp @@ -127,6 +127,9 @@ bool CAlert::RelayTo(CNode* pnode) const { if (!IsInEffect()) return false; + // don't relay to nodes which haven't sent their version message + if (pnode->nVersion == 0) + return false; // returns true if wasn't already contained in the set if (pnode->setKnown.insert(GetHash()).second) { -- cgit v1.2.3