mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-06 14:19:59 -05:00
Merge pull request #5169
20a5f61
Don't relay alerts to peers before version negotiation (Wladimir J. van der Laan)
This commit is contained in:
commit
7a9356bf16
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue