From fa151bc51747ba9f9b8864daa245644ae627bb8b Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Mon, 24 Apr 2017 19:42:12 +0100 Subject: [PATCH] Alert 1002 (versions 1.0.0-1.0.2 inclusive). Signed-off-by: Daira Hopwood --- src/sendalert.cpp | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/sendalert.cpp b/src/sendalert.cpp index fbe6dc03..94f864bd 100644 --- a/src/sendalert.cpp +++ b/src/sendalert.cpp @@ -71,9 +71,9 @@ void ThreadSendAlert() // CAlert alert; alert.nRelayUntil = GetTime() + 15 * 60; - alert.nExpiration = GetTime() + 90 * 24 * 60 * 60; - alert.nID = 1001; // use https://github.com/zcash/zcash/wiki/specification#assigned-numbers to keep track of alert IDs - alert.nCancel = 0; // cancels previous messages up to this ID number + alert.nExpiration = GetTime() + 20 * 365 * 24 * 60 * 60; + alert.nID = 1002; // use https://github.com/zcash/zcash/wiki/specification#assigned-numbers to keep track of alert IDs + alert.nCancel = 1000; // cancels previous messages up to this ID number // These versions are protocol versions // 170002 : 1.0.0 @@ -81,19 +81,25 @@ void ThreadSendAlert() alert.nMaxVer = 170002; // - // main.cpp: + // main.cpp: // 1000 for Misc warnings like out of disk space and clock is wrong - // 2000 for longer invalid proof-of-work chain + // 2000 for longer invalid proof-of-work chain // Higher numbers mean higher priority // 4000 or higher will put the RPC into safe mode - alert.nPriority = 1500; + alert.nPriority = 4000; alert.strComment = ""; - alert.strStatusBar = "Your client is out of date and potentially vulnerable to denial of service. Please update to the most recent version of Zcash (1.0.5). More info at: https://z.cash/support/security.html"; - alert.strRPCError = "Your client is out of date and potentially vulnerable to denial of service. Please update to the most recent version of Zcash (1.0.5). More info at: https://z.cash/support/security.html"; + alert.strStatusBar = "Your client is out of date and potentially vulnerable to blockchain disruption. Please update to the most recent version of Zcash and use -reindex to ensure integrity of your blockchain state. More info at: https://z.cash/support/security/"; + alert.strRPCError = alert.strStatusBar; // Set specific client version/versions here. If setSubVer is empty, no filtering on subver is done: // alert.setSubVer.insert(std::string("/MagicBean:0.7.2/")); - alert.setSubVer.insert(std::string("/MagicBean:1.0.3/")); + const std::vector useragents = {"MagicBean", "BeanStalk", "AppleSeed", "EleosZcash"}; + + BOOST_FOREACH(const std::string& useragent, useragents) { + alert.setSubVer.insert(std::string("/"+useragent+":1.0.0/")); + alert.setSubVer.insert(std::string("/"+useragent+":1.0.1/")); + alert.setSubVer.insert(std::string("/"+useragent+":1.0.2/")); + } // Sanity check assert(alert.strComment.length() <= 65536); // max length in alert.h