]> Git Repo - VerusCoin.git/commitdiff
Rename client identifier from Satoshi to MagicBean (closes #1481)
authorSimon <[email protected]>
Wed, 12 Oct 2016 00:10:22 +0000 (17:10 -0700)
committerSimon <[email protected]>
Wed, 12 Oct 2016 17:50:05 +0000 (10:50 -0700)
contrib/seeds/makeseeds.py
doc/tor.md
src/clientversion.cpp
src/rpcnet.cpp
src/sendalert.cpp
src/test/alert_tests.cpp
src/test/data/alertTests.raw

index 4072405ef509a80176bf7314b46eca525cffe1da..041f83e2b0bf332c4c641ba5f4e9871b8a260dff 100755 (executable)
@@ -27,7 +27,7 @@ import collections
 PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})):(\d+)$")
 PATTERN_IPV6 = re.compile(r"^\[([0-9a-z:]+)\]:(\d+)$")
 PATTERN_ONION = re.compile(r"^([abcdefghijklmnopqrstuvwxyz234567]{16}\.onion):(\d+)$")
-PATTERN_AGENT = re.compile(r"^(\/Satoshi:0\.8\.6\/|\/Satoshi:0\.9\.(2|3|4|5)\/|\/Satoshi:0\.10\.\d{1,2}\/|\/Satoshi:0\.11\.\d{1,2}\/)$")
+PATTERN_AGENT = re.compile(r"^(\/MagicBean:([0-9a-z-.]+)\/)$")
 
 def parseline(line):
     sline = line.split()
index 901e6e2c43dce091fc0c35ca0034d97638bb7102..e3cbfaeb123cb2289a6d6d78dad323174ff87f37 100644 (file)
@@ -109,8 +109,8 @@ Now use zcash-cli to verify there is only a single peer connection.
                "id" : 1,
                "addr" : "abc123.onion:18233",
                ...
-               "version" : 70002,
-               "subver" : "/Satoshi:0.11.2/",
+               "version" : 170002,
+               "subver" : "/MagicBean:1.0.0/",
                ...
            }
        ]
index 740a44ff9a1bd544bb3a86238c6ff27a98e70ee1..1e3eccbeabbe81f6f55126aa07542980fa311015 100644 (file)
@@ -19,7 +19,7 @@
  * for both bitcoind and bitcoin-core, to make it harder for attackers to
  * target servers or GUI users specifically.
  */
-const std::string CLIENT_NAME("Satoshi");
+const std::string CLIENT_NAME("MagicBean");
 
 /**
  * Client version number
index abbc32a62f2898e6e7cb9e3bbe8fe109b3e39639..e3d264a57c4ebcb8e240a6e2e6991481e06ac649 100644 (file)
@@ -96,8 +96,8 @@ Value getpeerinfo(const Array& params, bool fHelp)
             "    \"timeoffset\": ttt,         (numeric) The time offset in seconds\n"
             "    \"pingtime\": n,             (numeric) ping time\n"
             "    \"pingwait\": n,             (numeric) ping wait\n"
-            "    \"version\": v,              (numeric) The peer version, such as 7001\n"
-            "    \"subver\": \"/Satoshi:0.8.5/\",  (string) The string version\n"
+            "    \"version\": v,              (numeric) The peer version, such as 170002\n"
+            "    \"subver\": \"/MagicBean:x.y.z[-v]/\",  (string) The string version\n"
             "    \"inbound\": true|false,     (boolean) Inbound (true) or Outbound (false)\n"
             "    \"startingheight\": n,       (numeric) The starting height (block) of the peer\n"
             "    \"banscore\": n,             (numeric) The ban score\n"
@@ -387,7 +387,7 @@ Value getnetworkinfo(const Array& params, bool fHelp)
             "\nResult:\n"
             "{\n"
             "  \"version\": xxxxx,                      (numeric) the server version\n"
-            "  \"subversion\": \"/Satoshi:x.x.x/\",     (string) the server subversion string\n"
+            "  \"subversion\": \"/MagicBean:x.y.z[-v]/\",     (string) the server subversion string\n"
             "  \"protocolversion\": xxxxx,              (numeric) the protocol version\n"
             "  \"localservices\": \"xxxxxxxxxxxxxxxx\", (string) the services we offer to the network\n"
             "  \"timeoffset\": xxxxx,                   (numeric) the time offset\n"
index 07607ef159ae93c62508769907e4e72f8e4537bb..6fac530e2fff67e91bbf1ebced73b6b1f7965342 100644 (file)
@@ -92,7 +92,7 @@ void ThreadSendAlert()
     alert.strRPCError   = "URGENT: Upgrade required: see https://z.cash";
 
     // Set specific client version/versions here. If setSubVer is empty, no filtering on subver is done:
-    // alert.setSubVer.insert(std::string("/Satoshi:0.7.2/"));
+    // alert.setSubVer.insert(std::string("/MagicBean:0.7.2/"));
 
     // Sign
     const CChainParams& chainparams = Params();
index c9afafa953d826294b1b626cd208a3c200cf62ee..9a861f182b94ef0435ad6e972b3b62f1556eb886 100644 (file)
@@ -166,12 +166,12 @@ void GenerateAlertTests()
     SignAndSerialize(alert, sBuffer);
 
     // More tests go here ...
-    alert.setSubVer.insert(std::string("/Satoshi:0.1.0/"));
-    alert.strStatusBar  = "Alert 1 for Satoshi 0.1.0";
+    alert.setSubVer.insert(std::string("/MagicBean:0.1.0/"));
+    alert.strStatusBar  = "Alert 1 for MagicBean 0.1.0";
     SignAndSerialize(alert, sBuffer);
 
-    alert.setSubVer.insert(std::string("/Satoshi:0.2.0/"));
-    alert.strStatusBar  = "Alert 1 for Satoshi 0.1.0, 0.2.0";
+    alert.setSubVer.insert(std::string("/MagicBean:0.2.0/"));
+    alert.strStatusBar  = "Alert 1 for MagicBean 0.1.0, 0.2.0";
     SignAndSerialize(alert, sBuffer);
 
     alert.setSubVer.clear();
@@ -204,8 +204,8 @@ void GenerateAlertTests()
     SignAndSerialize(alert, sBuffer);
 
     ++alert.nID;
-    alert.strStatusBar  = "Alert 2 for Satoshi 0.1.0";
-    alert.setSubVer.insert(std::string("/Satoshi:0.1.0/"));
+    alert.strStatusBar  = "Alert 2 for MagicBean 0.1.0";
+    alert.setSubVer.insert(std::string("/MagicBean:0.1.0/"));
     SignAndSerialize(alert, sBuffer);
 
     ++alert.nID;
@@ -296,27 +296,27 @@ BOOST_AUTO_TEST_CASE(AlertApplies)
     // Matches:
     BOOST_CHECK(alerts[0].AppliesTo(1, ""));
     BOOST_CHECK(alerts[0].AppliesTo(999001, ""));
-    BOOST_CHECK(alerts[0].AppliesTo(1, "/Satoshi:11.11.11/"));
+    BOOST_CHECK(alerts[0].AppliesTo(1, "/MagicBean:11.11.11/"));
 
-    BOOST_CHECK(alerts[1].AppliesTo(1, "/Satoshi:0.1.0/"));
-    BOOST_CHECK(alerts[1].AppliesTo(999001, "/Satoshi:0.1.0/"));
+    BOOST_CHECK(alerts[1].AppliesTo(1, "/MagicBean:0.1.0/"));
+    BOOST_CHECK(alerts[1].AppliesTo(999001, "/MagicBean:0.1.0/"));
 
-    BOOST_CHECK(alerts[2].AppliesTo(1, "/Satoshi:0.1.0/"));
-    BOOST_CHECK(alerts[2].AppliesTo(1, "/Satoshi:0.2.0/"));
+    BOOST_CHECK(alerts[2].AppliesTo(1, "/MagicBean:0.1.0/"));
+    BOOST_CHECK(alerts[2].AppliesTo(1, "/MagicBean:0.2.0/"));
 
     // Don't match:
     BOOST_CHECK(!alerts[0].AppliesTo(-1, ""));
     BOOST_CHECK(!alerts[0].AppliesTo(999002, ""));
 
     BOOST_CHECK(!alerts[1].AppliesTo(1, ""));
-    BOOST_CHECK(!alerts[1].AppliesTo(1, "Satoshi:0.1.0"));
-    BOOST_CHECK(!alerts[1].AppliesTo(1, "/Satoshi:0.1.0"));
-    BOOST_CHECK(!alerts[1].AppliesTo(1, "Satoshi:0.1.0/"));
-    BOOST_CHECK(!alerts[1].AppliesTo(-1, "/Satoshi:0.1.0/"));
-    BOOST_CHECK(!alerts[1].AppliesTo(999002, "/Satoshi:0.1.0/"));
-    BOOST_CHECK(!alerts[1].AppliesTo(1, "/Satoshi:0.2.0/"));
-
-    BOOST_CHECK(!alerts[2].AppliesTo(1, "/Satoshi:0.3.0/"));
+    BOOST_CHECK(!alerts[1].AppliesTo(1, "MagicBean:0.1.0"));
+    BOOST_CHECK(!alerts[1].AppliesTo(1, "/MagicBean:0.1.0"));
+    BOOST_CHECK(!alerts[1].AppliesTo(1, "MagicBean:0.1.0/"));
+    BOOST_CHECK(!alerts[1].AppliesTo(-1, "/MagicBean:0.1.0/"));
+    BOOST_CHECK(!alerts[1].AppliesTo(999002, "/MagicBean:0.1.0/"));
+    BOOST_CHECK(!alerts[1].AppliesTo(1, "/MagicBean:0.2.0/"));
+
+    BOOST_CHECK(!alerts[2].AppliesTo(1, "/MagicBean:0.3.0/"));
 
     SetMockTime(0);
 }
index 23fbfa98f6a119fde9887e57242550b4b837447f..7dc9fd1e69b437030d717901ef963553ccd513e6 100644 (file)
Binary files a/src/test/data/alertTests.raw and b/src/test/data/alertTests.raw differ
This page took 0.042207 seconds and 4 git commands to generate.