From 1738e9aff6a3173ffd6c1cf583237500f4abde9e Mon Sep 17 00:00:00 2001 From: fsb4000 Date: Sun, 16 Nov 2014 07:11:55 +0600 Subject: [PATCH] Don't relay alerts to peers before version negotiation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Перенёс коммит из bitcoin/bitcoin https://github.com/bitcoin/bitcoin/commit/20a5f610d344dfc1dc0c6e5e9e4b0211370aa563 который решает https://github.com/bitcoin/bitcoin/issues/1436 --- src/alert.cpp | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/alert.cpp b/src/alert.cpp index a1dc27a..9172ad8 100644 --- a/src/alert.cpp +++ b/src/alert.cpp @@ -130,6 +130,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) { -- 1.7.1