mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Consolidate "Not Synced" error messages:
Work on a version 2 of the XRP Network API has begun. The new API returns: * `notSynced` in place of `noClosed`, `noCurrent`, and `noNetwork`; * `invalidParams` in place of `lgrIdxInvalid`. The new version 2 API cannot be selected yet, as it remains a work in progress. Fixes #3269
This commit is contained in:
committed by
Nik Bougalis
parent
0214d83aa5
commit
1067086f71
@@ -21,6 +21,7 @@
|
||||
#include <ripple/beast/unit_test.h>
|
||||
#include <ripple/protocol/ErrorCodes.h>
|
||||
#include <ripple/protocol/jss.h>
|
||||
#include <ripple/rpc/impl/RPCHelpers.h>
|
||||
#include <test/jtx.h>
|
||||
|
||||
namespace ripple {
|
||||
@@ -297,10 +298,19 @@ public:
|
||||
// date check to trigger
|
||||
env.timeKeeper().adjustCloseTime(weeks{3});
|
||||
result = env.rpc("ledger_request", "1")[jss::result];
|
||||
BEAST_EXPECT(result[jss::error] == "noCurrent");
|
||||
BEAST_EXPECT(result[jss::status] == "error");
|
||||
BEAST_EXPECT(
|
||||
result[jss::error_message] == "Current ledger is unavailable.");
|
||||
if (RPC::ApiMaximumSupportedVersion == 1)
|
||||
{
|
||||
BEAST_EXPECT(result[jss::error] == "noCurrent");
|
||||
BEAST_EXPECT(
|
||||
result[jss::error_message] == "Current ledger is unavailable.");
|
||||
}
|
||||
else
|
||||
{
|
||||
BEAST_EXPECT(result[jss::error] == "notSynced");
|
||||
BEAST_EXPECT(
|
||||
result[jss::error_message] == "Not synced to the network.");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user