Browse Source

Merge pull request #5169

20a5f61 Don't relay alerts to peers before version negotiation (Wladimir J. van der Laan)
0.10
Wladimir J. van der Laan 10 years ago
parent
commit
7a9356bf16
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 3
      src/alert.cpp

3
src/alert.cpp

@ -128,6 +128,9 @@ bool CAlert::RelayTo(CNode* pnode) const
{ {
if (!IsInEffect()) if (!IsInEffect())
return false; 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 // returns true if wasn't already contained in the set
if (pnode->setKnown.insert(GetHash()).second) if (pnode->setKnown.insert(GetHash()).second)
{ {

Loading…
Cancel
Save