diff options
Diffstat (limited to 'src/alert.cpp')
-rw-r--r-- | src/alert.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/alert.cpp b/src/alert.cpp index d495849206..64399a4260 100644 --- a/src/alert.cpp +++ b/src/alert.cpp @@ -1,13 +1,14 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Bitcoin developers -// Distributed under the MIT/X11 software license, see the accompanying +// Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "alert.h" #include "chainparams.h" -#include "key.h" +#include "clientversion.h" #include "net.h" +#include "pubkey.h" #include "timedata.h" #include "ui_interface.h" #include "util.h" @@ -127,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) { |