mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Integration test to validate the WS ledger results.
* Also replace a couple of magic values with the relevant Tuning param.
This commit is contained in:
committed by
Vinnie Falco
parent
dddcc09378
commit
e838b30def
@@ -20,6 +20,7 @@
|
||||
#include <BeastConfig.h>
|
||||
#include <ripple/app/ledger/InboundLedgers.h>
|
||||
#include <ripple/app/ledger/LedgerToJson.h>
|
||||
#include <ripple/rpc/impl/Tuning.h>
|
||||
|
||||
namespace ripple {
|
||||
|
||||
@@ -52,7 +53,8 @@ Json::Value doLedgerRequest (RPC::Context& context)
|
||||
return RPC::invalid_field_message (jss::ledger_index);
|
||||
|
||||
// We need a validated ledger to get the hash from the sequence
|
||||
if (ledgerMaster.getValidatedLedgerAge() > 120)
|
||||
if (ledgerMaster.getValidatedLedgerAge() >
|
||||
RPC::Tuning::maxValidatedLedgerAge)
|
||||
return rpcError (rpcNO_CURRENT);
|
||||
|
||||
auto ledgerIndex = jsonIndex.asInt();
|
||||
|
||||
@@ -486,7 +486,8 @@ checkTxJsonFields (
|
||||
|
||||
// Check for current ledger.
|
||||
if (verify && !getConfig ().RUN_STANDALONE &&
|
||||
(apiFacade.getValidatedLedgerAge() > 120))
|
||||
(apiFacade.getValidatedLedgerAge() >
|
||||
Tuning::maxValidatedLedgerAge))
|
||||
{
|
||||
ret.first = rpcError (rpcNO_CURRENT);
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user