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
@@ -270,7 +270,8 @@ checkTxJsonFields(
|
||||
bool const verify,
|
||||
std::chrono::seconds validatedLedgerAge,
|
||||
Config const& config,
|
||||
LoadFeeTrack const& feeTrack)
|
||||
LoadFeeTrack const& feeTrack,
|
||||
unsigned apiVersion)
|
||||
{
|
||||
std::pair<Json::Value, AccountID> ret;
|
||||
|
||||
@@ -308,7 +309,10 @@ checkTxJsonFields(
|
||||
if (verify && !config.standalone() &&
|
||||
(validatedLedgerAge > Tuning::maxValidatedLedgerAge))
|
||||
{
|
||||
ret.first = rpcError(rpcNO_CURRENT);
|
||||
if (apiVersion == 1)
|
||||
ret.first = rpcError(rpcNO_CURRENT);
|
||||
else
|
||||
ret.first = rpcError(rpcNOT_SYNCED);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -384,7 +388,8 @@ transactionPreProcessImpl(
|
||||
verify,
|
||||
validatedLedgerAge,
|
||||
app.config(),
|
||||
app.getFeeTrack());
|
||||
app.getFeeTrack(),
|
||||
getAPIVersionNumber(params));
|
||||
|
||||
if (RPC::contains_error(txJsonResult))
|
||||
return std::move(txJsonResult);
|
||||
@@ -1068,7 +1073,8 @@ transactionSubmitMultiSigned(
|
||||
true,
|
||||
validatedLedgerAge,
|
||||
app.config(),
|
||||
app.getFeeTrack());
|
||||
app.getFeeTrack(),
|
||||
getAPIVersionNumber(jvRequest));
|
||||
|
||||
if (RPC::contains_error(txJsonResult))
|
||||
return std::move(txJsonResult);
|
||||
|
||||
Reference in New Issue
Block a user