Remove legacy protocol version (1.2)

This commit is contained in:
Alloy Networks
2021-03-05 09:13:48 +02:00
committed by manojsdoshi
parent ab9039e77d
commit 2e456a835d
4 changed files with 8 additions and 24 deletions

View File

@@ -50,7 +50,6 @@ public:
run() override
{
testcase("Convert protocol version to string");
BEAST_EXPECT(to_string(make_protocol(1, 2)) == "RTXP/1.2");
BEAST_EXPECT(to_string(make_protocol(1, 3)) == "XRPL/1.3");
BEAST_EXPECT(to_string(make_protocol(2, 0)) == "XRPL/2.0");
BEAST_EXPECT(to_string(make_protocol(2, 1)) == "XRPL/2.1");
@@ -62,16 +61,16 @@ public:
// Empty string
check("", "");
check(
"RTXP/1.1,RTXP/1.3,XRPL/2.1,RTXP/1.2,XRPL/2.0",
"RTXP/1.2,XRPL/2.0,XRPL/2.1");
"RTXP/1.1,RTXP/1.2,RTXP/1.3,XRPL/2.1,XRPL/2.0",
"XRPL/2.0,XRPL/2.1");
check(
"RTXP/0.9,RTXP/1.01,XRPL/0.3,XRPL/2.01,XRPL/19.04,Oscar/"
"123,NIKB",
"");
check(
"RTXP/1.2,XRPL/2.0,RTXP/1.2,XRPL/2.0,XRPL/19.4,XRPL/7.89,XRPL/"
"XRPL/2.0,RTXP/1.2,XRPL/2.0,XRPL/19.4,XRPL/7.89,XRPL/"
"A.1,XRPL/2.01",
"RTXP/1.2,XRPL/2.0,XRPL/7.89,XRPL/19.4");
"XRPL/2.0,XRPL/7.89,XRPL/19.4");
check(
"XRPL/2.0,XRPL/3.0,XRPL/4,XRPL/,XRPL,OPT XRPL/2.2,XRPL/5.67",
"XRPL/2.0,XRPL/3.0,XRPL/5.67");
@@ -80,8 +79,7 @@ public:
{
testcase("Protocol version negotiation");
BEAST_EXPECT(
negotiateProtocolVersion("RTXP/1.2") == make_protocol(1, 2));
BEAST_EXPECT(negotiateProtocolVersion("RTXP/1.2") == std::nullopt);
BEAST_EXPECT(
negotiateProtocolVersion("RTXP/1.2, XRPL/2.0") ==
make_protocol(2, 0));