diff --git a/contrib/seeds/makeseeds.py b/contrib/seeds/makeseeds.py index 4072405ef..041f83e2b 100755 --- a/contrib/seeds/makeseeds.py +++ b/contrib/seeds/makeseeds.py @@ -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() diff --git a/doc/tor.md b/doc/tor.md index cc2039378..4b8c89bb0 100644 --- a/doc/tor.md +++ b/doc/tor.md @@ -103,8 +103,8 @@ Now use zcash-cli to verify there is only a single peer connection. "id" : 1, "addr" : "zctestseie6wxgio.onion:18233", ... - "version" : 70002, - "subver" : "/Satoshi:0.11.2/", + "version" : 170002, + "subver" : "/MagicBean:1.0.0/", ... } ] diff --git a/src/clientversion.cpp b/src/clientversion.cpp index 740a44ff9..1e3eccbea 100644 --- a/src/clientversion.cpp +++ b/src/clientversion.cpp @@ -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 diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp index abbc32a62..e3d264a57 100644 --- a/src/rpcnet.cpp +++ b/src/rpcnet.cpp @@ -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" diff --git a/src/sendalert.cpp b/src/sendalert.cpp index 07607ef15..6fac530e2 100644 --- a/src/sendalert.cpp +++ b/src/sendalert.cpp @@ -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(); diff --git a/src/test/alert_tests.cpp b/src/test/alert_tests.cpp index c9afafa95..9a861f182 100644 --- a/src/test/alert_tests.cpp +++ b/src/test/alert_tests.cpp @@ -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[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, "/Satoshi:0.3.0/")); + BOOST_CHECK(!alerts[2].AppliesTo(1, "/MagicBean:0.3.0/")); SetMockTime(0); } diff --git a/src/test/data/alertTests.raw b/src/test/data/alertTests.raw index 23fbfa98f..7dc9fd1e6 100644 Binary files a/src/test/data/alertTests.raw and b/src/test/data/alertTests.raw differ