fix: LedgerEntryNotExist unittest failure (#1564)

This commit is contained in:
cyan317
2024-07-29 16:41:10 +01:00
committed by GitHub
parent 3a3d8d46dd
commit 8d0e904ecb
2 changed files with 32 additions and 0 deletions

View File

@@ -24,6 +24,7 @@
#include "rpc/RPCHelpers.hpp"
#include "rpc/common/Types.hpp"
#include "util/AccountUtils.hpp"
#include "util/Assert.hpp"
#include <boost/json/conversion.hpp>
#include <boost/json/object.hpp>
@@ -33,6 +34,7 @@
#include <xrpl/basics/strHex.h>
#include <xrpl/json/json_value.h>
#include <xrpl/protocol/AccountID.h>
#include <xrpl/protocol/ErrorCodes.h>
#include <xrpl/protocol/Indexes.h>
#include <xrpl/protocol/Issue.h>
#include <xrpl/protocol/LedgerFormats.h>
@@ -153,6 +155,7 @@ LedgerEntryHandler::process(LedgerEntryHandler::Input input, Context const& ctx)
// check ledger exists
auto const range = sharedPtrBackend_->fetchLedgerRange();
ASSERT(range.has_value(), "Ledger range must be available");
auto const lgrInfoOrStatus = getLedgerHeaderFromHashOrSeq(
*sharedPtrBackend_, ctx.yield, input.ledgerHash, input.ledgerIndex, range->maxSequence
);