mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Check if synchronized in ripple_path_find
If a call to ripple_path_find does not specify a ledger, the call should fail if the server is not synchronized to the network.
This commit is contained in:
committed by
Vinnie Falco
parent
de6f678de7
commit
3078c6da12
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <BeastConfig.h>
|
||||
#include <ripple/rpc/RipplePathFind.h>
|
||||
#include <ripple/rpc/impl/Tuning.h>
|
||||
#include <ripple/app/main/Application.h>
|
||||
#include <ripple/app/paths/AccountCurrencies.h>
|
||||
#include <ripple/app/paths/FindPaths.h>
|
||||
@@ -79,6 +80,12 @@ Json::Value doRipplePathFind (RPC::Context& context)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (getApp().getLedgerMaster().getValidatedLedgerAge() >
|
||||
RPC::Tuning::maxValidatedLedgerAge)
|
||||
{
|
||||
return rpcError (rpcNO_NETWORK);
|
||||
}
|
||||
|
||||
context.loadType = Resource::feeHighBurdenRPC;
|
||||
lpLedger = context.netOps.getClosedLedger();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user