aboutsummaryrefslogtreecommitdiff
path: root/src/alert.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-11-03 08:49:24 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-11-03 08:49:31 +0100
commit7a9356bf16d3e21b99ce6badc88f949679f8e846 (patch)
tree316bfa97c46a7fced58816e983da0ed6d62c7ca5 /src/alert.cpp
parent04e988c6ce1e7255a9575ff2fd130219f03c64f2 (diff)
parent20a5f610d344dfc1dc0c6e5e9e4b0211370aa563 (diff)
Merge pull request #5169
20a5f61 Don't relay alerts to peers before version negotiation (Wladimir J. van der Laan)
Diffstat (limited to 'src/alert.cpp')
-rw-r--r--src/alert.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/alert.cpp b/src/alert.cpp
index f16898dc38..417bc281a7 100644
--- a/src/alert.cpp
+++ b/src/alert.cpp
@@ -128,6 +128,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)
{