Skip to content

Commit fd70211

Browse files
committed
Merge #9594: Send final alert message to older peers after connecting.
8ff8d21 Send final alert message to older peers after connecting. (Gregory Maxwell)
2 parents 5ac6687 + 8ff8d21 commit fd70211

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/net_processing.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,6 +1324,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
13241324
pfrom->nTimeOffset = nTimeOffset;
13251325
AddTimeData(pfrom->addr, nTimeOffset);
13261326

1327+
// If the peer is old enough to have the old alert system, send it the final alert.
1328+
if (pfrom->nVersion <= 70012) {
1329+
CDataStream finalAlert(ParseHex("60010000000000000000000000ffffff7f00000000ffffff7ffeffff7f01ffffff7f00000000ffffff7f00ffffff7f002f555247454e543a20416c657274206b657920636f6d70726f6d697365642c2075706772616465207265717569726564004630440220653febd6410f470f6bae11cad19c48413becb1ac2c17f908fd0fd53bdc3abd5202206d0e9c96fe88d4a0f01ed9dedae2b6f9e00da94cad0fecaae66ecf689bf71b50"), SER_NETWORK, PROTOCOL_VERSION);
1330+
connman.PushMessage(pfrom, CNetMsgMaker(nSendVersion).Make("alert", finalAlert));
1331+
}
1332+
13271333
// Feeler connections exist only to verify if address is online.
13281334
if (pfrom->fFeeler) {
13291335
assert(pfrom->fInbound == false);

0 commit comments

Comments
 (0)