chore: Update libxrpl to 2.3.0-b4 (#1667)

This commit is contained in:
Sergey Kuznetsov
2024-09-25 13:39:38 +01:00
committed by GitHub
parent d0c6b65870
commit 87f1c06b5b
7 changed files with 15 additions and 32 deletions

View File

@@ -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}};