Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable api_version 2 #4568

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ripple/rpc/impl/RPCHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ extern beast::SemanticVersion const lastVersion;
constexpr unsigned int apiInvalidVersion = 0;
constexpr unsigned int apiVersionIfUnspecified = 1;
constexpr unsigned int apiMinimumSupportedVersion = 1;
constexpr unsigned int apiMaximumSupportedVersion = 1;
constexpr unsigned int apiMaximumSupportedVersion = 2;
constexpr unsigned int apiBetaVersion = 2;

static_assert(apiMinimumSupportedVersion >= apiVersionIfUnspecified);
Expand Down
11 changes: 7 additions & 4 deletions src/test/rpc/AccountInfo_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,12 @@ class AccountInfo_test : public beast::unit_test::suite
Account const alice{"alice"};
env.fund(XRP(1000), alice);

auto const withoutSigners =
std::string("{ ") + "\"account\": \"" + alice.human() + "\"}";
auto const withoutSigners = std::string("{ ") +
"\"api_version\": 1, \"account\": \"" + alice.human() + "\"}";

auto const withSigners = std::string("{ ") + "\"account\": \"" +
alice.human() + "\", " + "\"signer_lists\": true }";
auto const withSigners = std::string("{ ") +
"\"api_version\": 1, \"account\": \"" + alice.human() + "\", " +
"\"signer_lists\": true }";

// Alice has no SignerList yet.
{
Expand Down Expand Up @@ -337,6 +338,7 @@ class AccountInfo_test : public beast::unit_test::suite
"\"id\": 5, "
"\"method\": \"account_info\", "
"\"params\": { "
"\"api_version\": 1, "
"\"account\": \"" +
alice.human() + "\"}}";

Expand All @@ -346,6 +348,7 @@ class AccountInfo_test : public beast::unit_test::suite
"\"id\": 6, "
"\"method\": \"account_info\", "
"\"params\": { "
"\"api_version\": 1, "
"\"account\": \"" +
alice.human() + "\", " + "\"signer_lists\": true }}";
// Alice has no SignerList yet.
Expand Down