aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-01-26 10:31:51 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2017-01-26 10:31:55 +0100
commitfd7021142a7a215c8b2e1b51f7bfe2a612886c7d (patch)
treefc41e009397adc52db237301823ee45a71637511 /src/net_processing.cpp
parent5ac668759dedb5272aefd33f305ae76c854a5737 (diff)
parent8ff8d219c3d9a0b6f604bb99ca4a27ad77cdb69b (diff)
downloadbitcoin-fd7021142a7a215c8b2e1b51f7bfe2a612886c7d.tar.xz
Merge #9594: Send final alert message to older peers after connecting.
8ff8d21 Send final alert message to older peers after connecting. (Gregory Maxwell)
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 5027c5109c..678541a44f 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -1324,6 +1324,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
pfrom->nTimeOffset = nTimeOffset;
AddTimeData(pfrom->addr, nTimeOffset);
+ // If the peer is old enough to have the old alert system, send it the final alert.
+ if (pfrom->nVersion <= 70012) {
+ CDataStream finalAlert(ParseHex("60010000000000000000000000ffffff7f00000000ffffff7ffeffff7f01ffffff7f00000000ffffff7f00ffffff7f002f555247454e543a20416c657274206b657920636f6d70726f6d697365642c2075706772616465207265717569726564004630440220653febd6410f470f6bae11cad19c48413becb1ac2c17f908fd0fd53bdc3abd5202206d0e9c96fe88d4a0f01ed9dedae2b6f9e00da94cad0fecaae66ecf689bf71b50"), SER_NETWORK, PROTOCOL_VERSION);
+ connman.PushMessage(pfrom, CNetMsgMaker(nSendVersion).Make("alert", finalAlert));
+ }
+
// Feeler connections exist only to verify if address is online.
if (pfrom->fFeeler) {
assert(pfrom->fInbound == false);