Browse Source

Don't relay alerts to peers before version negotiation

Fixes #1436
0.10
Wladimir J. van der Laan 10 years ago
parent
commit
20a5f610d3
  1. 3
      src/alert.cpp

3
src/alert.cpp

@ -127,6 +127,9 @@ bool CAlert::RelayTo(CNode* pnode) const @@ -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)
{

Loading…
Cancel
Save