diff --git a/src/data/CassandraBackend.hpp b/src/data/CassandraBackend.hpp index 0c9591616..fe9c460d1 100644 --- a/src/data/CassandraBackend.hpp +++ b/src/data/CassandraBackend.hpp @@ -950,7 +950,7 @@ class BasicCassandraBackend : public BackendInterface { std::vector statements; statements.reserve(data.size()); for (auto [mptId, holder] : data) - statements.push_back(schema_->insertMPTHolder.bind(std::move(mptId), std::move(holder))); + statements.push_back(schema_->insertMPTHolder.bind(mptId, holder)); executor_.write(std::move(statements)); } diff --git a/src/rpc/CredentialHelpers.cpp b/src/rpc/CredentialHelpers.cpp index bbea85ca7..ac6366d8b 100644 --- a/src/rpc/CredentialHelpers.cpp +++ b/src/rpc/CredentialHelpers.cpp @@ -21,6 +21,7 @@ #include "rpc/Errors.hpp" #include "rpc/JS.hpp" #include "rpc/common/Types.hpp" +#include "util/AccountUtils.hpp" #include "util/Assert.hpp" #include @@ -83,7 +84,7 @@ parseAuthorizeCredentials(boost::json::array const& jv) "issuer must be string, should already be checked in AuthorizeCredentialValidator" ); auto const issuer = - ripple::parseBase58(static_cast(jo.at(JS(issuer)).as_string())); + util::parseBase58Wrapper(static_cast(jo.at(JS(issuer)).as_string())); ASSERT( issuer.has_value(), "issuer must be present, should already be checked in AuthorizeCredentialValidator." ); diff --git a/src/rpc/common/APIVersion.hpp b/src/rpc/common/APIVersion.hpp index c4a14dc15..009dea3b0 100644 --- a/src/rpc/common/APIVersion.hpp +++ b/src/rpc/common/APIVersion.hpp @@ -34,16 +34,13 @@ static constexpr uint32_t API_VERSION_DEFAULT = 1u; /** * @brief Minimum API version supported by this build - * - * Note: Clio does not natively support v1 and only supports v2 or newer. - * However, Clio will forward all v1 requests to rippled for backward compatibility. */ static constexpr uint32_t API_VERSION_MIN = 1u; /** * @brief Maximum API version supported by this build */ -static constexpr uint32_t API_VERSION_MAX = 2u; +static constexpr uint32_t API_VERSION_MAX = 3u; /** * @brief A baseclass for API version helper diff --git a/src/rpc/handlers/LedgerEntry.cpp b/src/rpc/handlers/LedgerEntry.cpp index d27a00458..2d742b9d4 100644 --- a/src/rpc/handlers/LedgerEntry.cpp +++ b/src/rpc/handlers/LedgerEntry.cpp @@ -173,8 +173,9 @@ LedgerEntryHandler::process(LedgerEntryHandler::Input input, Context const& ctx) auto const mptIssuanceID = ripple::uint192{std::string_view(*(input.mptIssuance))}; key = ripple::keylet::mptIssuance(mptIssuanceID).key; } else if (input.mptoken) { - auto const holder = - ripple::parseBase58(boost::json::value_to(input.mptoken->at(JS(account)))); + auto const holder = util::parseBase58Wrapper( + boost::json::value_to(input.mptoken->at(JS(account))) + ); auto const mptIssuanceID = ripple::uint192{std::string_view(boost::json::value_to(input.mptoken->at(JS(mpt_issuance_id)))) }; diff --git a/src/web/Resolver.cpp b/src/web/Resolver.cpp index 33588154a..d6fa3850a 100644 --- a/src/web/Resolver.cpp +++ b/src/web/Resolver.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include namespace asio = boost::asio; @@ -98,7 +97,7 @@ Resolver::doResolve(std::string_view hostname, std::string_view service) { std::vector endpoints; for (auto&& endpoint : resolver_.resolve(hostname, service)) - endpoints.push_back(std::move(endpoint)); + endpoints.push_back(endpoint); return endpoints; } diff --git a/tests/unit/rpc/handlers/CredentialHelpersTests.cpp b/tests/unit/rpc/handlers/CredentialHelpersTests.cpp index 347d3376b..6cd9150c1 100644 --- a/tests/unit/rpc/handlers/CredentialHelpersTests.cpp +++ b/tests/unit/rpc/handlers/CredentialHelpersTests.cpp @@ -20,6 +20,7 @@ #include "rpc/CredentialHelpers.hpp" #include "rpc/Errors.hpp" #include "rpc/JS.hpp" +#include "util/AccountUtils.hpp" #include "util/AsioContextTestFixture.hpp" #include "util/MockBackendTestFixture.hpp" #include "util/MockPrometheus.hpp" @@ -96,7 +97,7 @@ TEST(ParseAuthorizeCredentialsTest, ValidCredentialsArray) ASSERT_TRUE(cred.isFieldPresent(ripple::sfCredentialType)); auto const expectedIssuer = - *ripple::parseBase58(static_cast(credential1[JS(issuer)].as_string())); + *util::parseBase58Wrapper(static_cast(credential1[JS(issuer)].as_string())); auto const expectedCredentialType = ripple::strUnHex(static_cast(credential1[JS(credential_type)].as_string())).value();