mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-30 08:35:52 +00:00
chore: Update libxrpl to 2.3.0-b4 (#1667)
This commit is contained in:
@@ -28,7 +28,7 @@ class Clio(ConanFile):
|
||||
'protobuf/3.21.9',
|
||||
'grpc/1.50.1',
|
||||
'openssl/1.1.1u',
|
||||
'xrpl/2.3.0-b1',
|
||||
'xrpl/2.3.0-b4',
|
||||
'libbacktrace/cci.20210118'
|
||||
]
|
||||
|
||||
|
||||
@@ -124,6 +124,9 @@ struct Amendments {
|
||||
REGISTER(NFTokenMintOffer);
|
||||
REGISTER(fixReducedOffersV2);
|
||||
REGISTER(fixEnforceNFTokenTrustline);
|
||||
REGISTER(fixInnerObjTemplate2);
|
||||
REGISTER(fixNFTokenPageLinks);
|
||||
REGISTER(InvariantsV1_1);
|
||||
|
||||
// Obsolete but supported by libxrpl
|
||||
REGISTER(CryptoConditionsSuite);
|
||||
|
||||
@@ -200,15 +200,13 @@ CustomValidator CustomValidators::SubscribeStreamValidator =
|
||||
"ledger", "transactions", "transactions_proposed", "book_changes", "manifests", "validations"
|
||||
};
|
||||
|
||||
static std::unordered_set<std::string> const reportingNotSupportStreams = {
|
||||
"peer_status", "consensus", "server"
|
||||
};
|
||||
static std::unordered_set<std::string> const notSupportStreams = {"peer_status", "consensus", "server"};
|
||||
for (auto const& v : value.as_array()) {
|
||||
if (!v.is_string())
|
||||
return Error{Status{RippledError::rpcINVALID_PARAMS, "streamNotString"}};
|
||||
|
||||
if (reportingNotSupportStreams.contains(boost::json::value_to<std::string>(v)))
|
||||
return Error{Status{RippledError::rpcREPORTING_UNSUPPORTED}};
|
||||
if (notSupportStreams.contains(boost::json::value_to<std::string>(v)))
|
||||
return Error{Status{RippledError::rpcNOT_SUPPORTED}};
|
||||
|
||||
if (not validStreams.contains(boost::json::value_to<std::string>(v)))
|
||||
return Error{Status{RippledError::rpcSTREAM_MALFORMED}};
|
||||
|
||||
@@ -49,7 +49,7 @@ struct AmendmentCenterTest : util::prometheus::WithPrometheus, MockBackendTest,
|
||||
TEST_F(AmendmentCenterTest, AllAmendmentsFromLibXRPLAreSupported)
|
||||
{
|
||||
for (auto const& [name, _] : ripple::allAmendments()) {
|
||||
ASSERT_TRUE(amendmentCenter.isSupported(name)) << "XRPL amendment not supported by Clio: " << name;
|
||||
EXPECT_TRUE(amendmentCenter.isSupported(name)) << "XRPL amendment not supported by Clio: " << name;
|
||||
}
|
||||
|
||||
ASSERT_EQ(amendmentCenter.getSupported().size(), ripple::allAmendments().size());
|
||||
|
||||
@@ -79,7 +79,7 @@ TEST(RPCErrorsTest, StatusAsBool)
|
||||
TEST(RPCErrorsTest, StatusEquals)
|
||||
{
|
||||
EXPECT_EQ(Status{RippledError::rpcUNKNOWN}, Status{RippledError::rpcUNKNOWN});
|
||||
EXPECT_NE(Status{RippledError::rpcUNKNOWN}, Status{RippledError::rpcREPORTING_UNSUPPORTED});
|
||||
EXPECT_NE(Status{RippledError::rpcUNKNOWN}, Status{RippledError::rpcINTERNAL});
|
||||
}
|
||||
|
||||
TEST(RPCErrorsTest, SuccessToJSON)
|
||||
|
||||
@@ -136,22 +136,13 @@ generateTestValuesForParametersTest()
|
||||
SubscribeParamTestCaseBundle{"StreamNotString", R"({"streams": [1]})", "invalidParams", "streamNotString"},
|
||||
SubscribeParamTestCaseBundle{"StreamNotValid", R"({"streams": ["1"]})", "malformedStream", "Stream malformed."},
|
||||
SubscribeParamTestCaseBundle{
|
||||
"StreamPeerStatusNotSupport",
|
||||
R"({"streams": ["peer_status"]})",
|
||||
"reportingUnsupported",
|
||||
"Requested operation not supported by reporting mode server"
|
||||
"StreamPeerStatusNotSupport", R"({"streams": ["peer_status"]})", "notSupported", "Operation not supported."
|
||||
},
|
||||
SubscribeParamTestCaseBundle{
|
||||
"StreamConsensusNotSupport",
|
||||
R"({"streams": ["consensus"]})",
|
||||
"reportingUnsupported",
|
||||
"Requested operation not supported by reporting mode server"
|
||||
"StreamConsensusNotSupport", R"({"streams": ["consensus"]})", "notSupported", "Operation not supported."
|
||||
},
|
||||
SubscribeParamTestCaseBundle{
|
||||
"StreamServerNotSupport",
|
||||
R"({"streams": ["server"]})",
|
||||
"reportingUnsupported",
|
||||
"Requested operation not supported by reporting mode server"
|
||||
"StreamServerNotSupport", R"({"streams": ["server"]})", "notSupported", "Operation not supported."
|
||||
},
|
||||
SubscribeParamTestCaseBundle{"BooksNotArray", R"({"books": "1"})", "invalidParams", "booksNotArray"},
|
||||
SubscribeParamTestCaseBundle{
|
||||
|
||||
@@ -486,22 +486,13 @@ generateTestValuesForParametersTest()
|
||||
"bothNotBool"
|
||||
},
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
"StreamPeerStatusNotSupport",
|
||||
R"({"streams": ["peer_status"]})",
|
||||
"reportingUnsupported",
|
||||
"Requested operation not supported by reporting mode server"
|
||||
"StreamPeerStatusNotSupport", R"({"streams": ["peer_status"]})", "notSupported", "Operation not supported."
|
||||
},
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
"StreamConsensusNotSupport",
|
||||
R"({"streams": ["consensus"]})",
|
||||
"reportingUnsupported",
|
||||
"Requested operation not supported by reporting mode server"
|
||||
"StreamConsensusNotSupport", R"({"streams": ["consensus"]})", "notSupported", "Operation not supported."
|
||||
},
|
||||
UnsubscribeParamTestCaseBundle{
|
||||
"StreamServerNotSupport",
|
||||
R"({"streams": ["server"]})",
|
||||
"reportingUnsupported",
|
||||
"Requested operation not supported by reporting mode server"
|
||||
"StreamServerNotSupport", R"({"streams": ["server"]})", "notSupported", "Operation not supported."
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user