aboutsummaryrefslogtreecommitdiff
path: root/src/alert.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-10-29 16:03:09 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-10-29 16:05:46 +0100
commit20a5f610d344dfc1dc0c6e5e9e4b0211370aa563 (patch)
tree8fb74ad872ae374d75616347da50648cc73760c6 /src/alert.cpp
parent723c7526368badda15df8ac1ffc047a0ab2e384a (diff)
downloadbitcoin-20a5f610d344dfc1dc0c6e5e9e4b0211370aa563.tar.xz
Don't relay alerts to peers before version negotiation
Fixes #1436
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 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)
{