Merge pull request #5169

20a5f61 Don't relay alerts to peers before version negotiation (Wladimir J. van der Laan)
This commit is contained in:
Wladimir J. van der Laan 2014-11-03 08:49:24 +01:00
commit 7a9356bf16
No known key found for this signature in database
GPG key ID: 74810B012346C9A6

View file

@ -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)
{