Compare commits

..

3 Commits

Author SHA1 Message Date
Niq Dudfield
c31119cf74 Fix missing includes in Catalogue.cpp for non-unity builds 2025-04-04 09:00:00 +07:00
Niq Dudfield
d546d761ce Fix using using Status with rpcError (#484) 2025-04-01 21:00:13 +10:00
RichardAH
e84a36867b Catalogue (#443) 2025-04-01 16:47:48 +10:00

View File

@@ -18,7 +18,9 @@
//==============================================================================
#include <ripple/app/ledger/Ledger.h>
#include <ripple/app/ledger/LedgerMaster.h>
#include <ripple/app/ledger/LedgerToJson.h>
#include <ripple/app/main/Application.h>
#include <ripple/app/tx/apply.h>
#include <ripple/basics/Log.h>
#include <ripple/basics/Slice.h>
@@ -549,9 +551,8 @@ doCatalogueCreate(RPC::JsonContext& context)
UPDATE_CATALOGUE_STATUS(ledgerUpto, min_ledger);
// Load the first ledger
auto status = RPC::getLedger(currLedger, min_ledger, context);
if (status.toErrorCode() != rpcSUCCESS)
return rpcError(status);
if (auto error = RPC::getLedger(currLedger, min_ledger, context))
return rpcError(error.toErrorCode(), error.message());
if (!currLedger)
return rpcError(rpcLEDGER_MISSING);
@@ -575,9 +576,8 @@ doCatalogueCreate(RPC::JsonContext& context)
// Load the next ledger
currLedger = nullptr; // Release any previous current ledger
auto status = RPC::getLedger(currLedger, ledger_seq, context);
if (status.toErrorCode() != rpcSUCCESS)
return rpcError(status);
if (auto error = RPC::getLedger(currLedger, ledger_seq, context))
return rpcError(error.toErrorCode(), error.message());
if (!currLedger)
return rpcError(rpcLEDGER_MISSING);